Re: Alternative to Thread.Sleep?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

"Andy" <andyj@xxxxxxxxxxxxxxxxxx> wrote in message
news:1186078913.434309.63530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 2, 10:16 am, "Ignacio Machin \( .NET/ C# MVP \)"
<ignacio.machin AT dot.state.fl.us> wrote:
What if you mark your thread as IsBackground, I'm under the impression
that
under this escenario the thread is just aborted.

The thread's are background threads already, but I wanted to be able
to pause execution as well. Also, the processing is such that I
didn't want the possiblity of the thread dying in the middle of the
processing code because the foreground thread terminated.

If the threads are marked as Background they will die as soon as the
foreground thread dies.


.



Relevant Pages

  • Re: Threads & Garbage Collection
    ... terminate the thread if the app terminates. ... A thread is either a background thread or a foreground thread. ... threads are identical to foreground threads, except that background threads ... > garbage collecting while it is running. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Calling Thread.Join() before leaving
    ... >> or a foreground thread. ... >> except that background threads do not prevent ... >> a process from terminating. ... > ThreadAbort Exception is throwed so I would imgine ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Alternative to Thread.Sleep?
    ... under this escenario the thread is just aborted. ... The thread's are background threads already, but I wanted to be able ... to pause execution as well. ... processing code because the foreground thread terminated. ...
    (microsoft.public.dotnet.languages.csharp)