
12 Apr
2009
12 Apr
'09
10:42 a.m.
Bulat Ziganshin wrote:
Hello ChrisK,
Sunday, April 12, 2009, 4:18:44 PM, you wrote:
The problem with the current behavior is that the writeSampleVar pretends to know how many blocked reader threads are waiting on a value. In reality these blocked threads may have been killed.
may be it's possible to add exception handling to the write operation?
A perfect fix would leave SampleVar's full behavior unchanged when there are no exceptions. This perfect fix does not exist. I claim it is possible to create a fix that leaves the documented behavior unchanged, but changes some of the actual detailed behavior. One such fix is up at http://haskell.org/haskellwiki/SafeConcurrent#SampleVar -- Chris