Re: how to end a thread from the main thread
- From: "Josh McFarlane" <darsant@xxxxxxxxx>
- Date: 20 Dec 2005 09:22:42 -0800
Mystique wrote:
> how to end a thread from the main thread
Ending a thread directly from another thread should always be
considered not an option.
If you want to end a UI thread, post a WM_CLOSE message to it and let
it terminate itself.
If you want to end a worker thread, use a variable to signal to the
thread that it's time to shut down.
If you need to wait until the thread is shutdown, wait on it's handle
in the main thread.
Which type of thread are you using?
Josh McFarlane
.
- Follow-Ups:
- Re: how to end a thread from the main thread
- From: Joseph M . Newcomer
- Re: how to end a thread from the main thread
- References:
- how to end a thread from the main thread
- From: Mystique
- how to end a thread from the main thread
- Prev by Date: how to end a thread from the main thread
- Next by Date: Re: Bitmap-Icons in Resource
- Previous by thread: how to end a thread from the main thread
- Next by thread: Re: how to end a thread from the main thread
- Index(es):
Relevant Pages
|