Implement atomicReadMVar, fixing #4001.
We add the invariant to the MVar blocked threads queue that threads blocked on an atomic read are always at the front of the queue. This invariant is easy to maintain, since takers are only ever added to the end of the queue. Signed-off-by: Edward Z. Yang <firstname.lastname@example.org>
Showing with 147 additions and 18 deletions