Ticket #4001 (new task)
Implement an atomic readMVar
| Reported by: | simonmar | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 7.6.2 |
| Component: | Runtime System | Version: | 6.12.2 |
| Keywords: | Cc: | ezyang@…, leon.p.smith@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Moderate (less than a day) |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
