Re: Multiple Threads Within the IDE
From: Santi (__informatica_at_ibcentre.es)
Date: 10/09/04
- Next message: Jesper: "DateTimePicker = Date & Time ??"
- Previous message: Stephen Lamb: "Re: Questions about Form.Invoke and Form.BeginInvoke"
- In reply to: Doug Thews: "Multiple Threads Within the IDE"
- Next in thread: Jon Skeet [C# MVP]: "Re: Multiple Threads Within the IDE"
- Reply: Jon Skeet [C# MVP]: "Re: Multiple Threads Within the IDE"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 9 Oct 2004 16:23:14 +0200
A thread ends when it exists the function that it is executing. If the
thread performs a continuos loop you usually use a boolean to control the
execution, something like:
bool run;
void Foo()
{
while( run )
{
// perform whatever
}
}
So what I do to stop and end the thread in a clean way is:
run = false;
this makes the executuion flow to exit the function and end the thread.
regards,
Santiago Corredoira.
- Next message: Jesper: "DateTimePicker = Date & Time ??"
- Previous message: Stephen Lamb: "Re: Questions about Form.Invoke and Form.BeginInvoke"
- In reply to: Doug Thews: "Multiple Threads Within the IDE"
- Next in thread: Jon Skeet [C# MVP]: "Re: Multiple Threads Within the IDE"
- Reply: Jon Skeet [C# MVP]: "Re: Multiple Threads Within the IDE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|