delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/09/20/09:15:42

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
X-Authentication-Warning: atacama.four-d.de: mail set sender to <tpfaff AT gmx DOT net> using -f
Date: Fri, 20 Sep 2002 15:15:13 +0200 (=?ISO-8859-1?Q?Westeurop=E4ische_Sommerzeit?=)
From: Thomas Pfaff <tpfaff AT gmx DOT net>
To: Robert Collins <rbcollins AT cygwin DOT com>
cc: cygwin-developers AT cygwin DOT com
Subject: Re: Recent change to init.cc for thread detach looks wrong?
In-Reply-To: <1032526586.9116.67.camel@lifelesswks>
Message-ID: <Pine.WNT.4.44.0209201507540.344-100000@algeria.intern.net>
X-X-Sender: pfaff AT antarctica DOT intern DOT net
MIME-Version: 1.0


On Fri, 20 Sep 2002, Robert Collins wrote:

> On Fri, 2002-09-20 at 17:42, Thomas Pfaff wrote:
> >
> >
> > On Fri, 20 Sep 2002, Robert Collins wrote:
> >
> > > On Fri, 2002-09-20 at 15:32, Christopher Faylor wrote:
> > > > Robert,
> > > > Your recent change:
> > > > 2002-09-11  Robert Collins  <rbtcollins AT hotmail DOT com>
> > > >
> > > >         * init.cc (dll_entry): On thread detach, if the thread hasn't
> > > >         exit()ed, do so.
> > > >
> > > > doesn't look right.  The code invokes pthread::exit which can block
> > > > waiting on a mutex, it seems.
> > >
> > > Ok, will correct this weekend.
> > >
> >
> > You may have a look at my pthread patch part 4 that shows how i
> > have implemented cleanup after thread termination.
>
> Ok, so this effectively calls pthread::~pthread, which closes the win32
> objects, but does not set exit values etc.

Right. But you may have a look in my pthread_self code where i mark a
thread that was created outside pthreads scope as detached, so no other
thread can ever wait on it.

This stuff is only necessary for threads that are created by CreateThread
or started by the service control manager and i do not expect that other
threads will ever want to join them.

Thomas

- Raw text -


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