delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/15/03:58:54

X-Spam-Check-By: sourceware.org
Date: Thu, 15 Jun 2006 09:58:40 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: listen/accept/fork behavior problem between cygwin1 1.5.18 and cygwin1.dll 1.5.19
Message-ID: <20060615075840.GA10596@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20060519024910 DOT GA32309 AT ns1 DOT anodized DOT com> <20060614204025 DOT GY16683 AT calimero DOT vinschen DOT de> <20060615023024 DOT GA3872 AT ns1 DOT anodized DOT com>
Mime-Version: 1.0
In-Reply-To: <20060615023024.GA3872@ns1.anodized.com>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jun 14 19:30, clayne AT anodized DOT com wrote:
> On Wed, Jun 14, 2006 at 10:40:25PM +0200, Corinna Vinschen wrote:
> > 
> > Thanks very much for your testcase.  I applied a patch to Cygwin, please
> > give the next developer snapshot from http://cygwin.com/snapshots/ a try.
> > 
> > Corinna
> 
> Thank you Corinna. This appears to work much better and expected. BTW: I think
> the same issue may also exist for both read() and write() and possibly any other
> read, write, send, recv variant when using multiple threads as opposed to single
> thread + select(). One thing I notice is that if a read() is in progress and one
> is currently sitting in select(), all other read()s in seperate select()s will
> then stall if the former read() times out or takes longer than expected.

Your observation is correct, the same issue exists for recv/send and,
FWIW, connect.  I can fix the connect case, too, but there is no easy
patch for the recv/send case, unfortunately.  This has to do with the
way WSAEventSelect is handled in WinSock.

For now, if you want concurrency, either use non-blocking recv/send
exclusively, or never spread handling of the same blocking socket over
multiple threads.  Hopefully I can come up with a solution for this
problem at one point.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019