[Haskell-cafe] Race condition possible?

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Feb 13 03:24:00 EST 2009


Hello Peter,

Friday, February 13, 2009, 2:17:52 AM, you wrote:

> If so, how would it be possible to make sure that the operation of
> reading the current time and writing the pair to the MVar is an
> "atomic" operation, in the sense that no thread switch can happen
> between the two? Would this require STM?

it may be better to change architecture so that you no more need
atomic operations - these are "unnatural" for mvar/chan approach


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list