Re: Thread join?
Re: Thread join?
- Subject: Re: Thread join?
- From: Michael Smith <email@hidden>
- Date: Wed, 9 Dec 2009 21:24:35 +1100
On Dec 9, 2009, at 12:42 PM, Duane Murphy wrote:
> How would one do the equivalent of join() for a thread in the kernel?
Typically, you don't.
> I think I have a situation where the underlying thread is exiting,
> possibly aborting, so that my built in thread exit indicators do not
> get called. This causes some threads to hang waiting for the thread to
> exit.
Threads don't normally abort; if your toplevel thread routine is responsible for tracking your threads' existence then control will pass back through it when a thread is terminating.
> Or maybe the right question is what is the appropriate way to wait on
> a thread that may abort or already be aborted?
You don't; you should not terminate threads that you know (may) have waiters.
In general, you should not be creating and destroying kernel threads in your workflow.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Thread join? (From: Duane Murphy <email@hidden>) |