Ticket #4001 (new task)
Implement an atomic readMVar
|Reported by:||simonmar||Owned by:|
|Type of failure:||None/Unknown||Difficulty:||Moderate (less than a day)|
|Test Case:||Blocked By:|
Requested by various people, most recently by John Launchbury.
The idea would be that readMVar is atomic, and never blocks if the MVar is full. A concurrent putMVar operation cannot intervene while readMVar is reading the value.
To implement this, we would need two kinds of blocked threads in the MVar queue, and putMVar would need to wake up zero or more readMVar operations followed by at most one takeMVar.