Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. exnFinally :: forall e m a . MonadTunnelIO m => Exn m e -> m a -> m () -> m a

    monadology Control.Monad.Ology.Data.Exn

    No documentation available.

  2. forkFinally :: IO a -> IO b -> IO ThreadId

    slave-thread SlaveThread

    Fork a slave thread with a finalizer action to run a computation on. The finalizer gets executed when the thread dies for whatever reason: due to being killed or an uncaught exception, or a normal termination. Note the order of arguments:

    forkFinally finalizer computation
    

  3. forkFinallyWithUnmask :: IO a -> ((forall x . () => IO x -> IO x) -> IO b) -> IO ThreadId

    slave-thread SlaveThread

    Like forkFinally, but provides the computation a function that unmasks asynchronous exceptions. See Note [Unmask] at the bottom of this module.

  4. forkFinally :: Unexceptional m => UIO a -> (Either PseudoException a -> UIO ()) -> m ThreadId

    unexceptionalio UnexceptionalIO

    Mirrors forkFinally, but since the body is UIO, the thread must terminate successfully or because of PseudoException

  5. forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId

    forkable-monad Control.Concurrent.Forkable

    Fork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked.

    forkFinally action and_then =
    mask $ \restore ->
    forkIO $ try (restore action) >>= and_then
    
    This function is useful for informing the parent when a child terminates, for example.

  6. forkFinally :: Unexceptional m => UIO a -> (Either PseudoException a -> UIO ()) -> m ThreadId

    unexceptionalio-trans UnexceptionalIO.Trans

    Mirrors forkFinally, but since the body is UIO, the thread must terminate successfully or because of PseudoException

  7. forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId

    verset Verset

    Fork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked.

    forkFinally action and_then =
    mask $ \restore ->
    forkIO $ try (restore action) >>= and_then
    
    This function is useful for informing the parent when a child terminates, for example.

Page 9 of many | Previous | Next