[ANN] moonpool 0.6

Dearest friends of the dual hump,

I’m happy to announce the release of moonpool 0.6. Moonpool is a library of schedulers and concurrency primitives for OCaml 4.xx and 5.xx, based on threads (possibly spread on multiple domains). Previous release announcements (0.5, 0.4, 0.3, 0.2, 0.1) contain more details.

This release is fairly large and contains some new libraries. The biggest improvement is the addition of moonpool.fib (OCaml 5 only): it defines lightweight fibers with structured concurrency, where the fibers can run on a thread pool chosen by the user. Fibers also come with fiber-local storage and a notion of cancellation that is propagated to children fibers. Overall, fibers are a nicer abstraction than bare futures (especially with monadic combinators). There are currently no cooperative IO primitives provided by the scheduler but I have plans.

Another new, more experimental library is moonpool-lwt (OCaml 5 only) which allows for interoperability between Lwt and moonpool: a moonpool future (or fiber) can be turned into a Lwt promise; and it becomes possible to await a Lwt promise from moonpool, in a thread-safe way.

Docs:

16 Likes