package picos

  1. Overview
  2. Docs
Pico scheduler interface

Install

Dune Dependency

Authors

Maintainers

Sources

picos-0.4.0.tbz
sha256=343a8b4759239ca0c107145b8e2cc94c14625fecc0b0887d3c40a9ab7537b8da
sha512=db22b0a5b3adc603c0e815c9011c779f892b9ace76be018b2198d3e24a7d96727c999701025fe5a5fd07d0b452cb7286fc50c939aba0e4dce809941e9ebc12a6

doc/picos.select/Picos_select/Intr/index.html

Module Picos_select.IntrSource

A mechanism to interrupt blocking Unix IO operations.

⚠️ The mechanism uses a signal which should not be used for other purposes.

⚠️ Beware that signal handling in OCaml 5.0.0 is known to be broken and several fixes were included in OCaml 5.1.0.

Sourcetype t

Represents an optional interrupt request.

Sourceval nothing : t

A constant for a no request. clr nothing does nothing.

Sourceval req : seconds:float -> t

req ~seconds requests an interrupt in the form of a signal delivered to the thread that made the request within the specified number of seconds. Blocking Unix IO calls typically raise an error with the Unix.EINTR error code when they are interrupted by a signal. Regardless of whether the signal gets triggered or a system call gets interrupted, the request must be cleared exactly once!

⚠️ Due to limitations of the OCaml system modules and unlike with typical timeout mechanisms, the interrupt may also be triggered sooner.

Sourceval clr : t -> unit

clr req either cancels or acknowledges the interrupt request. Every req must be cleared exactly once!

OCaml

Innovation. Community. Security.