A lightweight structured concurrency library
|LTS Haskell 20.16:||188.8.131.52@rev:1|
|Stackage Nightly 2023-03-28:||184.108.40.206@rev:1|
|Latest on Hackage:||220.127.116.11@rev:1|
Module documentation for 18.104.22.168
ki is a lightweight structured-concurrency library inspired by many other projects and blog posts:
- Kotlin coroutines
- Notes on structured concurrency, or: Go statement considered harmful
- Structured Concurrency in High-level Languages
- Update on Structured Concurrency
- Two Approaches to Structured Concurrency
- libdill: Structured Concurrency for C
A previous version of
ki also included a mechanism for soft-cancellation/graceful shutdown, which took inspiration
- Go Concurrency Patterns: Context
- .NET 4 Cancellation Framework
- Timeouts and cancellation for humans
- Graceful Shutdown
However, this feature was removed (perhaps temporarily) because the design of the API was unsatisfactory.
[22.214.171.124] - 2023-01-25
- Bugfix #20: previously, a child thread could deadlock when attempting to propagate an exception to its parent
[126.96.36.199] - 2022-08-14
- Compat: support GHC 9.4.1
[1.0.0] - 2022-06-30
Ki.Implicitmodule, and the ability to soft-cancel a
Durationtype and its associated API, including
IO Voidrather than an
forkcreate an unmasked thread, rather than inherit the parent’s masking state.
awaitAll(replacing the old
scopedkill threads in the order they were created.
Bugfix: Fix small memory leak related to closing a scope.
Bugfix: Fix subtle bug related to GHC’s treatment of deadlocked threads.
forkTry) propagate async exceptions.
scopedsafe to run with asynchronous exceptions masked.
Bugfix: propagate exceptions to creator of scope, not creator of thread
Performance: Use atomic fetch-and-add rather than a
TVarto track internal child thread ids.
[0.2.0] - 2020-12-17
- Breaking: Remove
- Breaking: Rename
[0.1.0.1] - 2020-11-30
Intto drop the
cabal-versionfrom 3.0 to 2.2 because
stackcannot parse 3.0.
[0.1.0] - 2020-11-11
- Initial release.