Handbook
Glossary
kqueue-mx
Vocabulary
io
.
backend
.
unix
.
multiplexers
.
kqueue
Definition
USING:
io.backend.unix.multiplexers
;
IN:
io.backend.unix.multiplexers.kqueue
TUPLE:
kqueue-mx
<
mx
events
;
Methods
USING:
generic
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue
kernel
unix.kqueue
;
M:
kqueue-mx
add-input-callback
[
M\
kqueue-mx
add-input-callback
(call-next-method)
]
[
[
EVFILT_READ
17
make-kevent
]
dip
register-kevent
]
2bi
;
USING:
generic
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue
kernel
unix.kqueue
;
M:
kqueue-mx
add-output-callback
[
M\
kqueue-mx
add-output-callback
(call-next-method)
]
[
[
EVFILT_WRITE
17
make-kevent
]
dip
register-kevent
]
2bi
;
USING:
accessors
destructors
io.backend.unix.multiplexers.kqueue
unix
;
M:
kqueue-mx
dispose*
fd>>
close-file
;
USING:
accessors
assocs
generic
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue
kernel
unix.kqueue
;
M:
kqueue-mx
remove-input-callbacks
2dup
reads>>
key?
[
[
M\
kqueue-mx
remove-input-callbacks
(call-next-method)
]
[
[
EVFILT_READ
EV_DELETE
make-kevent
]
dip
register-kevent
]
2bi
]
[
2drop
f
]
if
;
USING:
accessors
assocs
generic
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue
kernel
unix.kqueue
;
M:
kqueue-mx
remove-output-callbacks
2dup
writes>>
key?
[
[
M\
kqueue-mx
remove-output-callbacks
(call-next-method)
]
[
[
EVFILT_WRITE
EV_DELETE
make-kevent
]
dip
register-kevent
]
2bi
]
[
2drop
f
]
if
;
USING:
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue
kernel
unix.time
;
M:
kqueue-mx
wait-for-events
swap
dup
[
make-timespec
]
when
dupd
wait-kevent
handle-kevents
;