package picos

  1. Overview
  2. Docs
Pico scheduler framework

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.1.0.tbz
sha256=0f2dcc67ddd127c68f388f2c36a8725a15723e6aeba7d1ddfcf4e016b54a4674
sha512=bee2a99458a451be285e2f13cc3a9deda8eed4e118bcdfc51c256d2da5bae92eec3386c318fe42dcf451421543b519dc064967158b3f417c9b7b44ce97c5fb75

doc/picos.mpsc_queue/Picos_mpsc_queue/index.html

Module Picos_mpsc_queueSource

Multi-producer, single-consumer queue.

🏎️ This data structure is optimized for use as a scheduler's ready queue.

Sourcetype !'a t

A multi-producer, single-consumer queue.

Sourceval create : unit -> 'a t

create () returns a new empty multi-producer, single-consumer queue.

Interface for producers

Sourceval push : 'a t -> 'a -> unit

push queue value adds the value to the tail of the queue.

Sourceval push_head : 'a t -> 'a -> unit

push_head queue value adds the value to the head of the queue.

Interface for the owner / consumer

Sourceexception Empty

Raised by pop_exn in case it finds the queue empty.

Sourceval pop_exn : 'a t -> 'a

pop_exn queue tries to remove the value at the head of the queue. Returns the removed value or raises Empty in case the queue was empty.

⚠️ This should only be called by the owner / consumer of the queue.

  • raises Empty

    in case the queue was empty.

OCaml

Innovation. Community. Security.