On Mon, Oct 26, 2009, Evan Klitzke wrote: > In this example the other thread will have "stolen" your data, and > your callback may then block when it tries to read. However, this > example seems a bit unlikely to me; it would be a terrible program > that was susceptible to this race, and I see the O_NONBLOCK usage in > single-threaded programs. So are there any other legitimate uses for > this pattern?
Some code I've seen will continuously read from the buffer until EWOULDBLOCK is returned; same for writing. Same for accept() too. 2c, Adrian *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
