Lets take a few examples:
o Reading from the terminal o Reading from the network (i.e. AIDO) o Reading from anything else o Reading from another program via a pipe.
There is no risk at all for deadlocks unless you also read using 'read' in a separate thread.
/ Per Hedbor ()
Previous text:
2003-03-19 13:29: Subject: I/O callbacks in blocking mode
It was added to detect races where some code changes a socket to blocking code while other code (i.e. the callbacks) are still using it in nonblocking mode. Without that check, the result is typically a disastrous hang of the backend thread in that situation.
I can't think of a situation where one want to combine callbacks with blocking mode, because of the obvious risk to get a hanging backend. When and why is that used?
/ Martin Stjernholm, Roxen IS