Re: pthread_join and pthread_detach
Re: pthread_join and pthread_detach
- Subject: Re: pthread_join and pthread_detach
- From: email@hidden
- Date: Wed, 23 Mar 2005 14:36:19 +0100 (CET)
- Importance: Normal
>From Paul Forgey :
> What you are doing sounds frightening.
Yeah, I knew ;-)
Anyhow, I have arranged my program in a more reliable way yesterday -
something like what you kindly proposed, thx.
In fact, I was mainly wondering if I was encoutering a bug on the Mac
pthread lib.
And I still think there may be one, or at least a lake in the man pages.
I enclose an example, as requested by matt.
When I select a small amount of time work, that is when the main thread
'joins' the thread1 before the thread 1 calls pthread_detach, the program
crashes.
Well, not on the first trial, but on the second or the third.
In a few words, it seems that :
"You cannot call pthread_detach on a thread while a call to pthread_join
is pending"
This, at least, should be documented, no ?
All the best
Nicolas
Attachment:
main.cpp
Description: Binary data
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden