#4001: Implement an atomic readMVar
---------------------------------+------------------------------------------
    Reporter:  simonmar          |        Owner:                            
        Type:  task              |       Status:  new                       
    Priority:  normal            |    Milestone:  6.14 branch               
   Component:  Runtime System    |      Version:  6.12.2                    
    Keywords:                    |   Difficulty:  Moderate (less than a day)
          Os:  Unknown/Multiple  |     Testcase:                            
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown              
       Patch:  0                 |  
---------------------------------+------------------------------------------
 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`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4001>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to