A producer writes data then sets a flag; a consumer reads the flag then the data. · QuantMax