Re: Multiple Threads Within the IDE

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Santi (__informatica_at_ibcentre.es)
Date: 10/09/04


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.



Relevant Pages

  • Re: A question about VS IDE
    ... I found that any change I made to the code of a form, after saving and executing, it removed the Handles Button1.Click for that method. ... Make sure that all those methods does have handles for the events raised by that control. ... and copy the code from notepad into the sub. ... form_load event, recreate it, and it works. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: newbie: stuck on trying to modify a control porerty from within created thread. Pls some help.
    ... It doesn't matter where the method trying to modify the control is declared ... what is important is the thread executing that ... event is hooked by the control class. ... > You need to call BeginInvoke method of the delegate from the thread. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DetailsView Insert
    ... Microsoft Online Support ... | DetailsView control. ... |> in the control tree hierarchy which can be observed using the Trace ... |>> which query the IDENT_CURRENT after executing the insert statement. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Callback methods are executed in different threads. How have the main thread do the job???
    ... If you have a method declared in a class that inherits from Control and that ... a thread that has not created the control), but you want to have it executed ... > Wanting to avoid executing the event handler code in a different ... > worker thread that needs to update a UI element how can the update be ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [PATCH] signed binaries support [0/4]
    ... before executing. ... of suid-binaries, which are not trustworthy. ... But if you have taken control of a computer ...
    (Linux-Kernel)