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