On 08/26/2010 12:06 PM, Jeff Trawick wrote:
On Thu, Aug 26, 2010 at 1:02 AM, <[email protected] <mailto:[email protected]>> wrote:Author: mturk Date: Thu Aug 26 05:02:33 2010 New Revision: 989443 URL: http://svn.apache.org/viewvc?rev=989443&view=rev <http://svn.apache.org/viewvc?rev=989443&view=rev> Log: Loop if the recv gets WSAEWOULDBLOCK ordinarily I'd think loop-while-EWOULDBLOCK would be an undesirable busy loop why is this a special case?
We already have a data written in the loopback adapter, and in 99% of the cases data is already there so the WSAEWOULDBLOCK would never get returned. However if running as VM guest with 2+ cores, it can have a single recv returning EWOULDBLOCK. I did some profiling and the second call to the recv always return the required data, so at max there is 2 recv calls. Regards -- ^TM
