Handbook
Glossary
with-timeout ( obj quot -- )
I/O timeout protocol
Prev:
cancel-operation ( obj -- )
Vocabulary
io
.
timeouts
Inputs
obj
an
object
quot
a
quotation
with stack effect
( obj -- )
Outputs
None
Word description
Applies the quotation to the object. If the object's timeout expires before the quotation returns,
cancel-operation
is called on the object.
Definition
USING:
kernel
;
IN:
io.timeouts
:
with-timeout
( obj quot -- )
over
timeout
[
[
dup
timeout
]
dip
with-timeout*
]
[
call
]
if
;
inline