mask package:concurrency

Executes a computation with asynchronous exceptions masked. That is, any thread which attempts to raise an exception in the current thread with throwTo will be blocked until asynchronous exceptions are unmasked again. The argument passed to mask is a function that takes as its argument another function, which can be used to restore the prevailing masking state within the context of the masked computation. This function should not be used within an uninterruptibleMask.
Like mask, but does not pass a restore action to the argument.
Like asyncOn but using forkOnWithUnmask internally.
Like asyncOnWithUnmask but using a named thread for better debugging information.
Like async but using forkWithUnmask internally.
Like asyncWithUnmask but using a named thread for better debugging information.
Like withAsyncOn bit uses forkOnWithUnmask internally.
Like withAsyncOnWithUnmask but using a named thread for better debugging information.
Like withAsync bit uses forkWithUnmask internally.
Like withAsyncWithUnmask but using a named thread for better debugging information.
Like modifyMVar, but the IO action in the second argument is executed with asynchronous exceptions masked.
Like modifyMVar_, but the IO action in the second argument is executed with asynchronous exceptions masked.
Like withMVar, but the IO action in the second argument is executed with asynchronous exceptions masked.
Like forkOS, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function should not be used within a mask or uninterruptibleMask.
forkOSWithUnmask = forkOSWithUnmaskN ""
Like forkOSWithUnmask, but the thread is given a name which may be used to present more useful debugging information.
forkOSWithUnmaskN _ = forkOSWithUnmask
Like forkWithUnmask, but the child thread is pinned to the given CPU, as with forkOn.
forkOnWithUnmask = forkOnWithUnmaskN ""
Like forkWithUnmaskN, but the child thread is pinned to the given CPU, as with forkOn.
forkOnWithUnmaskN _ = forkOnWithUnmask
Like fork, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function should not be used within a mask or uninterruptibleMask.
forkWithUnmask = forkWithUnmaskN ""
Like forkWithUnmask, but the thread is given a name which may be used to present more useful debugging information.
forkWithUnmaskN _ = forkWithUnmask
Return the MaskingState for the current thread.
Like mask, but the masked computation is not interruptible. THIS SHOULD BE USED WITH GREAT CARE, because if a thread executing in uninterruptibleMask blocks for any reason, then the thread (and possibly the program, if this is the main thread) will be unresponsive and unkillable. This function should only be necessary if you need to mask exceptions around an interruptible operation, and you can guarantee that the interruptible operation will only block for a short period of time. The supplied unmasking function should not be used within a mask.
Like uninterruptibleMask, but does not pass a restore action to the argument.
Set the MaskingState for the current thread to MaskedUninterruptible.