Re: pthread_join
Re: pthread_join
- Subject: Re: pthread_join
- From: Marc Van Olmen <email@hidden>
- Date: Thu, 9 Sep 2004 12:46:43 -0400
Hi,
I still don't understand why the pthread_join doesn't work..
one extra info is that the thread is sleeping, with a mutex:
pthread_cond_wait(&mCondVar, &mMutex);
But of course I signaled the mutex to wake up...
cheers,
mvo
On Sep 9, 2004, at 2:49 AM, Marc Van Olmen wrote:
Hi
In a thread A I want to wait until thread B finishes...
pthread_join(B,NULL);
FW_ASSERT(gThread_B_Finished==TRUE);
At the end of the thread function B, I put a global gThread_B_Finished
Boolean to true...
just for testing that pthread_join(B,NULL); really worked....
I notice that sometimes this global variable is false!!! Which means
pthread_join doesn't always works!!!
Are there cases pthread_join doesn't work?
regards,
mvo
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
References: | |
| >pthread_join (From: Marc Van Olmen <email@hidden>) |