Handbook
Glossary
(wait-to-read) ( port -- )
Factor handbook
»
Input and output
»
Non-blocking I/O implementation
Prev:
io-multiplex ( nanos -- )
Next:
(wait-to-write) ( port -- )
Vocabulary
io
.
ports
Inputs
port
an
input-port
Outputs
None
Generic word contract
Suspends the current thread until the port's buffer has data available for reading.
Definition
USING:
io.backend
;
IN:
io.ports
HOOK:
(wait-to-read)
io-backend
( port -- )
Methods
USING:
accessors
destructors
io.files
io.ports
kernel
system
;
M:
unix
(wait-to-read)
dup
dup
handle>>
check-disposed
refill
dup
[
dupd
wait-for-port
(wait-to-read)
]
[
2drop
]
if
;