
#8972: Investigate adding fast compare-and-swap Int type/primops -------------------------------------+------------------------------------ Reporter: tibbe | Owner: tibbe Type: feature request | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #8157, #7883 -------------------------------------+------------------------------------ Comment (by jberryman): Replying to [comment:10 nominolo]:
For GHC, I think it could be useful to have both mechanisms available. Marking a thread as non-interruptable could be exported from a "Here be dragons" module for using when you know that a thread will hold a lock/MVar only for a very short time.
Would this be something like `mask` but for scheduling? If so I want. From a library-writers point of view this would be a really easy way to get rid of a lot of bad scheduling effects, e.g. in probably every use of `modifyMVar`. Sorry if I'm not understanding. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8972#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler