apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Interruptable pollset
Date Mon, 16 Feb 2009 12:22:14 GMT
Arsen Chaloyan wrote:
> Well, below is final at this time not so trivial issue still concerning 
> Windows implementation only.
> 
> Description:
> Interruptable pollset creation sporadically fails.
> 
> How to reproduce:
> Call apr_pollset_create() in a loop, say 100 times, you will see that 
> some of the attempts fail.
> 
> How to fix:
> See static apr_status_t create_socket_pipe(SOCKET *rd, SOCKET *wr) in 
> file_io/win32/pipe.c
> 
> The following assumption is not always true
>         /* Listening socket is nonblocking by now.
>          * The accept must create the socket
>          * immediatelly because we connected already.
>          */
> 
> I would say: The accept should create the socket, but still may fail.
> 

Good point.

> As far as listening socket is nonblocking, reasonable number of attempts 
> of accept() call should be considered. Alternatively listening socket 
> can be switched to blocking mode before accept() call.
>

Think I'll try the way how it should be done
(standard wait on WSAEWOULDBLOCK)


Regards
-- 
^(TM)

Mime
View raw message