I/O timeout protocol


Streams, processes and monitors support optional timeouts, which impose an upper bound on the length of time for which an operation on these objects can block. Timeouts are used in network servers to prevent malicious clients from holding onto connections forever, and to ensure that runaway processes get killed.
timeout ( obj -- dt/f )

set-timeout ( dt/f obj -- )


The I/O timeout protocol can be implemented by any class wishing to support timeouts on blocking operations.
cancel-operation ( obj -- )


A combinator to be used in operations which can time out:
with-timeout ( obj quot -- )


See also
Stream protocol, Operating system processes, File system change monitors