-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
There are some pretty reasonable situations where it makes sense to allow multiple threads to race to fill the same IVar. Currently, that programming model is prohibited. The lvish package provides limited support by using == to test for equality on a second put. I think this seems an eminently reasonable thing to do. I also think it would also make sense to offer an "unsafe" version that simply does nothing when the IVar is full. I think implementation probably shouldn't be too terrible; one way would be to change the Put constructor to
| forall a . Put (IVar a) a (Bool -> Trace)This informs the continuation of whether the IVar was already full.
Metadata
Metadata
Assignees
Labels
No labels