[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket, Win32 and select()
- From: Rici Lake <lua@...>
- Date: Thu, 27 Jan 2005 23:14:27 -0500
On 27-Jan-05, at 11:01 PM, Diego Nehab wrote:
Why do you insist this is not a bug?
I don't insist that it is not a bug. It may well be a bug. I do
not program against the winsock stack, anyway.
All I said was that I did not believe that you could, in general,
know that a send() would not return EWOULDBLOCK (or, alternatively,
block) even though select() said it was writable.
And I stand by that -- you can't guarantee that on Posix systems,
and apparently you can't guarantee that on Windows either.
How am I supposed to avoid busy wait in the presence of this bug?
If you get EWOULDBLOCK, go do something else and then wait for
select() to return the socket as writable again. What's the problem?