Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: ChrisK <haskell <at> list.mightyreason.com>
Subject: ANN: MSem replacement for QSem
Newsgroups: gmane.comp.lang.haskell.cafe
Date: Saturday 11th April 2009 11:26:19 UTC (over 8 years ago)
"Grasshopper, try to take the stone from my hand"

Hello all,

  After looking at the code for QSem [1], I realize it is not exception
safe.
And it does more work than needed.

  I have a proposed replacement module MSem at
http://haskell.org/haskellwiki/SafeConcurrent
on the wiki.

  I claim this is a safer, more correct, and more efficient replacement for
QSem.  But I may be tragically wrong which is where you come in.  Please
try and
find some strange concurrency bug that I have missed.  Once there is
reviewed
replacement code I will propose changing the base package.

  Exception safe replacements for QSemN and SampleVar are also needed.

  The MSem code I have can be generalized into an "MSemN", but the
semantics are
be different from "QSemN".  This MSemN only considers the needs of the
first
blocked waiter instead of all of them.  The code MSemN is on the same wiki
page,
perhaps someone will find this variant useful.

Cheers,
  Chris

[1]
http://www.haskell.org/ghc/docs/latest/html/libraries/base/src/Control-Concurrent-QSem.html
 
CD: 3ms