Handbook
Glossary
set-timeout ( dt/f obj -- )
I/O timeout protocol
Prev:
timeout ( obj -- dt/f )
Next:
cancel-operation ( obj -- )
Vocabulary
io
.
timeouts
Inputs
dt/f
a
duration
or
f
obj
an
object
Outputs
None
Generic word contract
Sets an object's timeout.
Examples
Waits five seconds for a process that sleeps for ten seconds:
USING: calendar io.launcher io.timeouts kernel ; "sleep 10" >process 5 seconds over set-timeout run-process
Process was killed as a result of a call to kill-process, or a timeout
Definition
IN:
io.timeouts
GENERIC:
set-timeout
( dt/f obj -- )
Methods
USING:
accessors
io.encodings
io.timeouts
;
M:
decoder
set-timeout
stream>>
set-timeout
;
USING:
io.streams.duplex
io.timeouts
kernel
;
M:
duplex-stream
set-timeout
>duplex-stream<
[
set-timeout
]
bi-curry@
bi
;
USING:
accessors
io.encodings
io.timeouts
;
M:
encoder
set-timeout
stream>>
set-timeout
;
USING:
accessors
io.monitors
io.timeouts
;
M:
monitor
set-timeout
timeout<<
;
USING:
io.streams.null
io.timeouts
kernel
;
M:
null-stream
set-timeout
2drop
;
USING:
accessors
io.ports
io.timeouts
;
M:
port
set-timeout
timeout<<
;
USING:
accessors
io.launcher
io.timeouts
;
M:
process
set-timeout
timeout<<
;