public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Pthread_join waits endlessly for already ended thread
@ 2009-03-16 13:14 Torsten Andre2
  2009-03-19  0:34 ` Ross Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Torsten Andre2 @ 2009-03-16 13:14 UTC (permalink / raw)
  To: pthreads-win32


Hello,

I'm having trouble concerning pthread_join as described in this [1]
posting. A "thread A" endlessly waits for an already ended "thread B" which
called "return NULL" or "pthread_exit(NULL)" (tried both). Sometimes it
seems if you wait long enough thread A passes the pthread_join statement,
though not always. Unfortunately I haven't been able to find anything in
the mail archive, though I am sure that this has been covered before.

Thread B hangs while calling longjmp (sp->start_mark, exception) in
ptw32_throw.c. I have read about the different styles to cleanup, but I
have to admit that currently I don't understand what they are about. All
that matters is that I get pthreads to execute properly at the moment.

I downloaded pthreads 2.8.0 source code and use Visual Studio 2008
Professional C++  to compile it using Win32-Debug settings on a Windows
Server 2008 x64 system. I haven't changed any settings of the VC++
project . The program calling pthread functions is written in C++. Besides
using the source code without any alterations, I also tried to use the
binary dll versions VC2 and VCE2. Both dll's did not solve the problem.

In [1] Ross states the problem may be another dllmain being called. Though
I don't believe that's the problem in my case, I don't define any other
dllmains but the one in Pthreads. Most probably, I guess, the problem is a
wrong defined symbol or something related.

Can someone please give me a hint how to get pthread to work properly? Any
help is highly appreciated. Thank you.

Cheers,
      Torsten



[1] http://www.nabble.com/pthread_join-problem-td9687824.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-22 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-16 13:14 Pthread_join waits endlessly for already ended thread Torsten Andre2
2009-03-19  0:34 ` Ross Johnson
2009-03-19 11:54   ` Virgilio Alexandre Fornazin
2009-03-20 23:37     ` Ross Johnson
2009-03-22 21:51       ` good job! Michel Pacilli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).