Broken beyond repair: Control.Concurrent.SampleVar
haskell at list.mightyreason.com
Sun Apr 12 10:42:02 EDT 2009
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
More information about the Libraries