package eio

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Eio.Domain_managerSource

Parallel computation across multiple CPU cores.

Sourceclass virtual t : object ... end
Sourceval run : t -> (unit -> 'a) -> 'a

run t f runs f () in a newly-created domain and returns the result.

Other fibers in the calling domain can run in parallel with the new domain.

Warning: f must only access thread-safe values from the calling domain, but this is not enforced by the type system.

If the calling fiber is cancelled, this is propagated to the spawned domain.

Sourceval run_raw : t -> (unit -> 'a) -> 'a

run_raw t f is like run, but does not run an event loop in the new domain, and so cannot perform IO, fork fibers, etc.