mask package:exception-transformers

Executes a computation with asynchronous exceptions masked. 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.