Is this a bug in multithreading code?

Nick Name nick.name@inwind.it
Fri, 25 Apr 2003 18:33:06 +0200


Il 22:54, mercoledì 23 aprile 2003, hai scritto:
> I conjecture that the problem would go away if you added appropriate
> uses of seq or $! to your program so that the value stored in the MVar
> was always fully evaluated

You are right, the following code works well

strictIncM x = return $! x + 1

...
forkIO (loopM (modifyMVar_ v strictIncM))
...

Thanks for your help

Vincenzo