I’m happy to announce mwt 0.1.0, a library providing preemptive thread pools for use from Lwt.
mwt supports interaction between Lwt and OCaml’s native Thread.t
threads. It is similar to Lwt_preemptive
, but with user-managed pools of threads. A program may create an arbitrary number of pools. Each thread in a pool has a (potentially unit/meaningless) state which persists for the life of the thread. This state can be useful, for example, when working with bindings to a C library which requires initialization, use and disposal of some value withing a single system thread.
API documentation is available here.