Then you're using threads? Or have you stopped writing network servers?
I mean, the archetypical non-blocking operation is having two sockets connected to two clients, where each client idles a while and then send some request you have to act upon. (And then you have a third fd that you accept on. You could neglect setting that fd into non-blocking mode, and it will probably work most of the time (depending on how select/poll works), but it doesn't seem particularly robust).
In the end, the non-blocking _flag_ is braindamaged. djb is right when he says that operating systems *should* provide nonblocking syscalls read_ndelay and write_ndelay (and accept_ndelay, etc).
/ Niels Möller ()
Previous text:
2003-03-19 13:43: Subject: I/O callbacks in blocking mode
I very seldom use nonblocking mode nowdays to read using callbacks, actually. It's only if I also write data that I use nonblocking mode.
/ Per Hedbor ()