package picos
Pico scheduler framework
Install
Dune Dependency
Authors
Maintainers
Sources
picos-0.3.0.tbz
sha256=544804c0bde4b29764f82f04e7defed7c06bc43e5a6ce3f7fdc326cb54a7f066
sha512=4c93427e477fb52374a554a8b9c4c92836a9b5899161275d1473269ab526a1f59177209140631ed763a55be375855dea12f076e18bf4124522414986c0e257be
doc/picos.fifos/Picos_fifos/index.html
Module Picos_fifos
Source
Basic single-threaded effects based Picos
compatible scheduler for OCaml 5.
ℹ️ This scheduler implementation is mostly meant as an example and for use in testing libraries implemented in Picos
.
Briefly:
current
returns the current fiber.spawn
forks a new deep effect handler for each fiber.yield
pushes the current fiber to the back of the internal queue and takes the next fiber to run from the head of the internal queue.cancel_after
uses a per-domain background thread that runs aUnix.select
loop to cancel computations.await
stores the current fiber to be resumed through the trigger and takes next fiber to run from the head of the internal queue.
This scheduler also gives priority to fibers woken up from await
due to being canceled.
run ~forbid main
runs the main
thunk with the scheduler. Returns after main
and all of the fibers spawned by main
have returned.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>