HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleasync-2.2.6Haskell2010

Control.Concurrent.Async.Warden

A more flexible way to create Asyncs and have them automatically cancelled when the Warden is shut down.

  • 2 types
  • 6 values
  • Packageasync-2.2.6
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceWarden.hs
valueshutdown :: Warden -> IO ()
#

Shutdown a Warden, calling cancel on all owned threads. Subsequent calls to spawn and shutdown will be no-ops.

Note that any exceptions thrown by the threads will be ignored. If you want exceptions to be propagated, either call wait explicitly on the Async, or use link.

valuespawnMask :: Warden -> ((forall b. IO b -> IO b) -> IO a) -> IO (Async a)
#

Spawn a thread with masked exceptions and pass an unmask function to the action.