Asynchronous exception wormholes kill modularity

Bas van Dijk v.dijk.bas at gmail.com
Wed Apr 7 16:23:35 EDT 2010


On Wed, Apr 7, 2010 at 5:12 PM, Simon Marlow <marlowsd at gmail.com> wrote:
> Comments?

I really like this design.

One question, are you planning to write the MVar utility functions
using 'mask' or using 'nonInterruptibleMask'? As in:

> withMVar :: MVar a -> (a -> IO b) -> IO b
> withMVar m f = whichMask? $ \restore -> do
>   a <- takeMVar m
>   b <- restore (f a) `onException` putMVar m a
>   putMVar m a
>   return b

regards,

Bas


More information about the Libraries mailing list