Handbook
Glossary
interrupt ( thread -- )
Factor handbook
»
The language
»
Co-operative threads
»
Yielding and suspending threads
Prev:
sleep ( dt -- )
Next:
suspend ( state -- obj )
Vocabulary
threads
Inputs
thread
a
thread
Outputs
None
Word description
Interrupts a sleeping thread.
Definition
USING:
accessors
heaps
kernel
;
IN:
threads
:
interrupt
( thread -- )
dup
state>>
[
[
[
sleep-queue
heap-delete
]
when*
f
]
change-sleep-entry
dup
resume
]
when
drop
;