package fuseau

  1. Overview
  2. Docs

Scheduler that runs fibers.

The scheduler is responsible for running fibers that are ready, but it doesn't directly deal with timeouts, readiness events, etc. For these see Event_loop.

type t

A scheduler

val active : t -> bool

Is the scheduler not finished yet?

val dispose : t -> unit

Delete the scheduler. Idempotent and thread-safe. This cancels the remaining fibers. The scheduler will stop running when they all terminate.

val n_tasks_since_beginning : t -> int

Number of tasks run so far in this scheduler.

val get_for_current_thread : unit -> t

Get scheduler from the current thread. This must be called from within a Fuseau fiber.

  • raises Failure

    if not run from within a fiber


Innovation. Community. Security.