Hi,
I try to wrap inotify API. After adding a watcher, I try to read events
from file descriptor. But the racket thread is blocking until the read
operation is done. Here is the definition of read.
(define _read (get-ffi-obj "read" libc (_fun #:async-apply (lambda (f) (f))
#:save-errno 'posix
_fd_t
(output : (_bytes o size))
(size : _uint32)
-> (r : _int32)
-> (values r saved-errno
output))))
I am confused by the term callback. Is the callback called in the racket
thread or another OS thread?
Thanks,
Haiwei
____________________
Racket Users list:
http://lists.racket-lang.org/users