This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: cygthread::cygthread() hang
- From: Joe Buehler <jbuehler at hekimian dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 03 Apr 2003 10:23:27 -0500
- Subject: Re: cygthread::cygthread() hang
- Organization: Spirent Communications, Inc.
- References: <3E8B46D4.6070605@hekimian.com> <20030402224756.GA9668@redhat.com>
- Reply-to: jbuehler at hekimian dot com
Christopher Faylor wrote:
h is only set once when the thread is first started up. cygthread
threads are persistent to avoid thread creation/exit.
If this is truly a case of h being NULL in the above, then add code to
catch that in the ifdef DEBUGGING case.
I added some code in cygthread::new() to make sure that h is set when
new() exits. I have still run into the problem -- h is 0 when
cygthread::cygthread() tests it. So it is being clobbered after
new() initializes it.
My guess at this point is that there is something wrong in the
implementation of cygthread::detach() and
cygthread::terminate_thread() -- they were changed/added recently
and terminate_thread() sets h to 0.
--
Joe Buehler