supervisors

Monitor groups of threads with non-hierarchical lifetimes.

https://github.com/zenhack/haskell-supervisors

Latest on Hackage:0.2.1.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Ian Denhardt
Maintained by [email protected]

The supervisors package provides a useful abstraction for managing the groups of Haskell threads, which may not have a strictly hierarchical structure to their lifetimes.

Concretely, the library provides a Supervisor construct, which can be used to safely spawn threads while guaranteeing that:

  • When the supervisor is killed, all of the threads it supervises will be killed.

  • Child threads can terminate in any order, and memory usage will always be proportional to the number of *live* supervised threads.

One way to think of it is that supervisors is to async as resourcet is to bracket.

Note that this package is EXPERIMENTAL; it needs more careful testing before I can earnestly recommend relying on it.

See the README and module documentation for more information.