concurrent-extra
concurrent-extra copied to clipboard
RLock and asynchronous exceptions
I believe that RLock needs uninterruptible masking around the outer MVar. Otherwise, since takeMVar is interruptible, it may happen that release gets interrupted after taking the outer lock but before the inner lock is released.