[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Different behavior of my code



> Nonblocking I/O has not much to do with it, you don't necessarily need
> nonblocking I/O if you have working poll(2) or select(2).
> 
> It is a limitation of OS X. Every other platform with kqueue(2) and all
> I am aware of with poll(2) support it on all file descriptors. OS X
> doesn't support it on anything other than sockets - so not on ttys, not
> on files, not anything except sockets.
> 
> This is annoying because it means you can't manage tty file descriptors
> or file descriptors linked to devices such as /dev/null (both of which
> are commonly used for eg stdout) with libevent unless you force it to
> use select.
> 

Correct me if I'm wrong here, but while you can technically have a file
descriptor set to non-blocking, you are still limited to flush
operations which result in CPU waits. This can result in blocking. 

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.