Module queue

Source
Expand description

Run-queue structures to support a work-stealing scheduler

Structsยง

Inner ๐Ÿ”’
Local ๐Ÿ”’
Producer handle. May only be used from a single thread.
Steal ๐Ÿ”’
Consumer handle. May be used from many threads.

Constantsยง

LOCAL_QUEUE_CAPACITY ๐Ÿ”’
MASK ๐Ÿ”’

Functionsยง

len ๐Ÿ”’
Calculate the length of the queue using the head and tail. The head can be the steal or real head.
local ๐Ÿ”’
Create a new local run-queue
make_fixed_size ๐Ÿ”’
pack ๐Ÿ”’
Join the two head values
unpack ๐Ÿ”’
Split the head value into the real head and the index a stealer is working on.

Type Aliasesยง

AtomicUnsignedLong ๐Ÿ”’
AtomicUnsignedShort ๐Ÿ”’
UnsignedLong ๐Ÿ”’
UnsignedShort ๐Ÿ”’