Re: pthread_join and pthread_detach
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Importance: Normal User-agent: SquirrelMail/1.4.2
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 _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com main.cpp
participants (1)
-
Nicolas.Castagne@imag.fr