haskell at list.mightyreason.com
Sat Jun 2 14:22:47 CEST 2012
This message is in three parts: a problem, a solution, and a request for help.
The problem is that Control.Concurrent.QSem, QSemN, and SampleVar are all still
broken. GHC ticket #3160 is still open . These three synchronization
mechanisms can be irretrievable broken by a killThread on a blocked waiter.
The solution is that I am please to announce that SafeSemaphore has been updated
to 0.9.0 on hackage  and github. These provides safe solutions to replace
QSem and QSemN, actually several such solutions. See the github  page
(scroll down for README) for a summary of all the modules.
The request for help is that I would like to unbreak the Haskell Platform by
replacing the guts of QSem, QSemN, and SampleVar with SafeSemaphore.
Do you think my replacement is correct or buggy? Can we get #3160 closed?
Replacing these will preserve their API but may tinker with corner case
undocumented behavior. Should waiters block in FIFO order? Should QSemN starve
big or small requests to be fairer?
 http://hackage.haskell.org/trac/ghc/ticket/3160 (three years old!)
More information about the Libraries