run-queue ( -- dlist )
Factor handbook » The language » Co-operative threads » Thread implementation

Next:sleep-queue ( -- heap )


Vocabulary
threads

Inputs
None

Outputs
dlista dlist


Variable description
Global variable holding the queue of runnable threads. Calls to yield switch to the thread which has been in the queue for the longest period of time.

By convention, threads are queued with push-front and dequed with pop-back.

Definition