wait-for-fd ( handle event -- )
Vocabulary
io.backend.unix
Definition
USING:
combinators
io.backend.unix.multiplexers
kernel
namespaces
threads
;
IN:
io.backend.unix
:
wait-for-fd
( handle event -- )
dup
+retry+
eq?
[
2drop
]
[
[
[
swap
handle-fd
mx
get-global
]
]
dip
[
{
{
+input+
[
add-input-callback
]
}
{
+output+
[
add-output-callback
]
}
}
case
]
curry
compose
"I/O"
suspend
nip
[
io-timeout
]
when
]
if
;