[Haskell-cafe] ANN: concurrent-extra-0.1

Felipe Lessa felipe.lessa at gmail.com
Wed Feb 17 09:27:37 EST 2010


Hello,

Thanks for the release!

On Wed, Feb 17, 2010 at 03:10:38PM +0100, Roel van Dijk wrote:
> * RLock: A lock which can be acquired multiple times by the same
>   thread. Also known as a reentrant mutex.

In acquire (l. 111), if the lock was already acquired it goes by

        | otherwise   → do putMVar mv mb
                           Lock.acquire lock

So it puts back the information about the owner of the RLock and
waits for its release in the normal Lock.  And then... nothing?
Shouldn't it need to put into mv information about itself?

In release (l. 142) Nothing is put into mv

                        then do Lock.release lock
                                putMVar mv Nothing

Cheers,

--
Felipe.


More information about the Haskell-Cafe mailing list