[ANN] Picos ā€” Interoperable effects based concurrency

Picos is a framework for building interoperable elements such as

  • schedulers that multiplex large numbers of user level fibers to run on a small number of system level threads,
  • mechanisms for managing fibers and for structuring concurrency,
  • communication and synchronization primitives, such as mutexes and condition variables, message queues, STMs, and more, and
  • integrations with low level asynchronous IO systems,

of effects based cooperative concurrent programming models.

12 Likes

Iā€™m happy to announce that version 0.2.0 of Picos is now available on opam.

A small core picos framework allows concurrent abstractions implemented in Picos to communicate with Picos compatible schedulers.

In addition to the core framework, the picos package comes with a couple of sample schedulers and some scheduler agnostic libraries as well as a bunch of auxiliary libraries.

Sample schedulers:

  • picos.fifos ā€” Basic single-threaded effects based Picos compatible scheduler for OCaml 5.
  • picos.threaded ā€” Basic Thread based Picos compatible scheduler for OCaml 4.

Scheduler agnostic libraries:

  • picos.sync ā€” Basic communication and synchronization primitives for Picos.
  • picos.stdio ā€” Basic IO facilities based on OCaml standard libraries for Picos.
  • picos.select ā€” Basic Unix.select based IO event loop for Picos.

Auxiliary libraries:

  • picos.domain ā€” Minimalistic domain API available both on OCaml 5 and on OCaml 4.
  • picos.exn_bt ā€” Wrapper for exceptions with backtraces.
  • picos.fd ā€” Externally reference counted file descriptors.
  • picos.htbl ā€” Lock-free hash table.
  • picos.mpsc_queue ā€” Multi-producer, single-consumer queue.
  • picos.rc ā€” External reference counting tables for disposable resources.
  • picos.thread ā€” Minimalistic thread API available with or without threads.posix.

All of the above are entirely opt-in and you are free to mix-and-match with any other Picos compatible future schedulers and libraries implemented in Picos or develop your own.

See the reference manual for further information.

19 Likes