Any file descriptor that can be managed by epoll/kqueue is eligible. Libraries that want asynchronous treatment of I/O need to cooperate with the I/O manager by
- making file descriptors non-blocking, and
- calling the
threadWaitReadandthreadWaitWritefunctions inGHC.Concbefore retrying a system call that previously returnedEWOULDBLOCK.
This has already been done for the Handle and Socket types. If you use e.g. a binding to a C database library you will get blocking behavior as that library won’t cooperate with the I/O manager.