apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r989443 - /apr/apr/trunk/file_io/win32/pipe.c
Date Thu, 26 Aug 2010 11:37:23 GMT
On 08/26/2010 12:06 PM, Jeff Trawick wrote:
> On Thu, Aug 26, 2010 at 1:02 AM, <mturk@apache.org <mailto:mturk@apache.org>>
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

Mime
View raw message