On Fri, Apr 9, 2010 at 3:22 AM, Isaac Dupree
<m...@isaac.cedarswampstudios.org> wrote:
> OK, thanks for the link!  In fact, [tell me if my reasoning is wrong...], in
> that fork-definition, the 'putMVar' will never block, because there is only
> putMVar one for each created MVar.

Yes that's correct.

> I seem to remember that any execution of
> putMVar that does not *actually* block is guaranteed not be interrupted by
> asynchronous exceptions (if within a Control.Exception.block) -- which would
> be sufficient.  Is my memory right or wrong?

The following documentation seems to suggest that "any function which
_may_ itself block is defined as interruptible":

http://haskell.org/ghc/docs/latest/html/libraries/base-4.2.0.0/Control-Exception.html#13

That doesn't answer your question precisely however.

If it is the case that operations are only interruptible when they
actually block then I don't need a nonInterruptibleMask in this last
example. However I still need one in my first example because the
takeMVar in decrement may absolutely block.

regards,

Bas
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to