package picos
Pico scheduler interface
Install
Dune Dependency
Authors
Maintainers
Sources
picos-0.4.0.tbz
sha256=343a8b4759239ca0c107145b8e2cc94c14625fecc0b0887d3c40a9ab7537b8da
sha512=db22b0a5b3adc603c0e815c9011c779f892b9ace76be018b2198d3e24a7d96727c999701025fe5a5fd07d0b452cb7286fc50c939aba0e4dce809941e9ebc12a6
doc/picos.lwt/Picos_lwt/module-type-System/index.html
Module type Picos_lwt.System
Source
Signature for a module that Picos_lwt.run
requires for interoperating with the system that Lwt
runs on.
val sleep : float -> unit Lwt.t
sleep seconds
returns a cancelable promise that resolves after the given number of seconds.
val trigger : unit -> trigger
trigger ()
returns a new thread-safe, single use signaling mechanism.
⚠️ This may only be called on the main thread on which Lwt
runs.
val signal : trigger -> unit
signal trigger
resolves the promise that await trigger
returns.
ℹ️ It must be safe to call signal
from any thread or domain. As a special case this need not be thread-safe in case the system only allows a single thread.
await trigger
returns a promise thet resolves, on the main thread, after signal trigger
has been called.
⚠️ This may only be called on the main thread on which Lwt
runs.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>