Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hallo All
can any body tell me

What is the difference between a Worker Thread and a Normal Thread?
Posted
Comments
wizardzz 18-Apr-11 11:34am    
Homework?

It's partly terminology. People use the word "worker" when they mean a thread that does not own or interact with UI. Threads that do handle UI are called "UI" threads. Usually, your main (primary) thread will be the thread that owns and manages UI. And then you start one or more worker threads that do specific tasks. These worker threads do not modify the UI directly.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 18-Apr-11 23:32pm    
My 5, but your last sentence looks incomplete: ...directly ...but they can use the methods...
See my Solution which I added exclusively to fill in some vacuum you left with this sentence :-)
--SA
Nish Nishant 19-Apr-11 8:34am    
Thanks.
Imagine I continue the Solition by Nishant:

These worker threads do not modify the UI directly…

…but they can use the methods Invoke or BeginInvoke of System.Windows.Forms.Control or System.Threading.Dispatcher. See my past answer where it is explained in detail:
Control.Invoke() vs. Control.BeginInvoke()[^],
Problem with Treeview Scanner And MD5[^].

—SA
 
Share this answer
 
Comments
Nish Nishant 19-Apr-11 8:34am    
Good extra info, my 5.
Sergey Alexandrovich Kryukov 19-Apr-11 13:23pm    
Thank you, Nishant.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900