More about Thread

T

Tony Johansson

Hi!

When you apply the IsBackground property on the main thread you get that
main thread is not a backgroundThread.
Thread newThread = new Thread(new ThreadStart(TestMethod));
If you apply IsBackground on newThread above you get that newThread is not
a background Thread

If you use this System.ComponentModel.BackgroundWorker to create a Thread
and then use IsBackground you will get
the answer that this Thred is a background thread. This was expected because
of the Type whivh was BackgroundWorker.

I wonder what is the difference between having a Thread that is a Background
and when you have a Thread that is not ?

//Tony.
 
F

Family Tree Mike

Hi!

When you apply the IsBackground property on the main thread you get that
main thread is not a backgroundThread.
Thread newThread = new Thread(new ThreadStart(TestMethod));
If you apply IsBackground on newThread above you get that newThread is not
a background Thread

If you use this System.ComponentModel.BackgroundWorker to create a Thread
and then use IsBackground you will get
the answer that this Thred is a background thread. This was expected because
of the Type whivh was BackgroundWorker.

I wonder what is the difference between having a Thread that is a Background
and when you have a Thread that is not ?

//Tony.

In the remarks section of this link,
http://msdn.microsoft.com/en-us/library/system.threading.thread.isbackground.aspx,
is a good explanation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top