All Projects → ocaml-multicore → domainslib

ocaml-multicore / domainslib

Licence: ISC License
Parallel Programming over Domains

Programming Languages

ocaml
1615 projects
Makefile
30231 projects

domainslib - Parallel Programming over Multicore OCaml

domainslib provides control and data structure for parallel programming using domains.

The supported data structures are:

  • Channels
    • Channels may be shared between multiple senders and receivers.
    • Channels ensure FIFO message order.
    • Channels come in two flavours -- bounded (fixed-buffer size (>= 0) beyond which the send blocks) and unbounded.
  • Task
    • Work-stealing task pool with async/await parallelism and parallel for loop.

See examples for usage.

Installation

The library can be installed using multicore-opam, an OPAM repository of multicore specific packages.

$ opam switch create 4.12.0+domains+effects
$ opam install domainslib

Development

If you are interested in hacking on the implementation, then opam pin this repository:

First install the multicore compiler and dune:

$ opam switch create 4.12.0+domains+effects
$ opam install dune

Then, pin a clone of this repo:

$ git clone https://github.com/ocaml-multicore/domainslib
$ cd domainslib
$ opam pin add domainslib file://`pwd`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].