On Tue, 4 Oct 2016 16:24:30 +0200, Sönke Ludwig wrote:

I'll have to look into where exactly it hangs - it could be stuck in
libevent - but one issue is that socketPair creates the sockets in
blocking mode. You'd either have to use the Posix socketpair function
together with SOCK_NONBLOCK, or use fnctl on the socket(s) created
by socketPair to set them to non-blocking mode after creation.

Does FileDescriptorEvent work properly with non-blocking sockets only?

Another question:
after waiting for both read and write event, how to determine which event type occurred?

evt.wait(FileDescriptorEvent.Trigger.any);
if(???) {
    // writting
} else {
    // reading
}