package affect

  1. Overview
  2. Docs
Streamlined and natural concurrency model for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

affect-0.0.0.tbz
sha512=b328f6696e60c489da8cc2e8fad0537ca6634a39fc0c5de5840d4f98561f110617ef79ba8285ee8427dd99908c6b3d39114973598cddc5ded91abcce3b91b9a6

doc/affect/Affect/Fun/Async/Schedule/index.html

Module Async.ScheduleSource

Scheduling parameters.

Priorities

Note. Priorities are currently ignored by Fun.Async.main.

Sourcetype priority =
  1. | Low
    (*

    Background computation.

    *)
  2. | Normal
    (*

    Normal computation.

    *)
  3. | High
    (*

    Urgent or interactive computation.

    *)

The type for scheduling priority hints.

Sourceval pp_priority : Format.formatter -> priority -> unit

pp_priority formats priorities for inspection.

Scheduling parameters

Sourcetype t

The type for function scheduling parameters.

Sourceval make : ?only_main:bool -> ?priority:priority -> unit -> t

make () are scheduling parameters with:

  • only_main if true the function is always only scheduled the main domain of the scheduler, i.e. the one which executes Affect.Fun.Async.main. Defaults to false.
  • priority is a scheduling priority hint. Defaults to the caller's priority.
Sourceval only_main : t -> bool

See make.

Sourceval priority : t -> priority option

See make. None means that the priority is inherited from the caller.

Sourceval default : t

default is make ().