Legend:
Library
Module
Module type
Parameter
Class
Class type
Basic multi-threaded effects based Picos compatible scheduler for OCaml 5.
This scheduler uses a queue per thread to implement a mostly FIFO scheduler. If a thread runs out of fibers to run, it will try to take a fiber from the queues of other threads, which means that fibers can move from one thread to another. This scheduler also gives priority to fibers woken up due to being canceled.
🐌 Due to mostly FIFO scheduling this scheduler performs poorly on highly parallel workloads.
ℹ️ See Picos_std_fifos for a single-threaded variation of this scheduler.
ℹ️ This scheduler implementation is mostly meant as an example and for use in testing libraries implemented in Picos.
⚠️ This scheduler uses Picos_io_select internally. If running multiple threads that each run this scheduler, Picos_io_select.configure must be called by the main thread before creating other threads.
type t
Represents a shared context for fifo runners.
val context : ?quota:int ->?fatal_exn_handler:(exn -> unit)->unit ->t
context () creates a new context for randomized runners. The context should be consumed by a call of run ~context ....
The optional quota argument defaults to Int.max_int and determines the number of effects a fiber is allowed to perform before it is forced to yield.