package saturn_lockfree
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Module Saturn_lockfree.Single_consumer_queueSource
Lock-free multi-producer, single-consumer, domain-safe queue without support for cancellation.
This makes a good data structure for a scheduler's run queue and is currently (September 2022) used for Eio's scheduler.
A queue of items of type 'a.
close q marks q as closed, preventing any further items from being pushed by the producers (i.e. with push).
push q v adds the element v at the end of the queue q. This can be used safely by multiple producer domains, in parallel with the other operations.
Consumer-only functions
pop_opt q removes and returns the first element in queue q or returns None if the queue is empty.
peek_opt q returns the first element in queue q or returns None if the queue is empty.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page