Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread_join and pthread_detach



>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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >pthread_join and pthread_detach (From: email@hidden)
 >Re: pthread_join and pthread_detach (From: Paul Forgey <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.