sleep ( dt -- )
Factor handbook > The language > Co-operative threads > Yielding and suspending threads

Prev:yield ( -- )
Next:interrupt ( thread -- )


Vocabulary
threads

Inputs and outputs
dta duration


Word description
Suspends the current thread for the given duration.

Other threads may interrupt the sleep by calling interrupt.

Examples
USING: threads calendar ; 10 seconds sleep


Definition


Methods