Re: Thread Question
- From: Kent Johnson <kent@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 15:43:38 -0500
D wrote:
My question is, how would I go
about creating the thread? I have seen examples that used classes, and
other examples that just called one thread start command - when should
you use one over another?
For simple use it doesn't matter. Use a class when you want to add more state or behaviour - for example you might want a flag that tells the thread to stop, or a Queue to communicate with the thread. A class might be more convenient in these cases.
IOW if you can write it as a single function it doesn't matter much which form you use; for more complex usage you may want a class.
Kent
.
- Follow-Ups:
- Re: Thread Question
- From: D
- Re: Thread Question
- References:
- Thread Question
- From: D
- Thread Question
- Prev by Date: Re: Thread Question
- Next by Date: Re: minimize a program into an icon on the taskbar.
- Previous by thread: Re: Thread Question
- Next by thread: Re: Thread Question
- Index(es):
Relevant Pages
|