ThreadPool and worker threads

Hi Experts,

I have a ThreadPool and I want to know if I use Thread.Suspend(): is the Thread put in the queue or is it always one of the 25 working threads ?
If not, how can I put this thread back in the queue and let other threads execute ?

Thanks in advance for your help.
LVL 9
nouloukAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShazbotOKCommented:
if you are calling a thread that is *already* in the ThreadPool then you should be "done" as you are only referencing the thread not 'pulling it from the queue'.  the other threads would be indipendant of that thread unless your telling the ThreadPool to suspend all threads...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nouloukAuthor Commented:
Thanks ShakbotOK,

Ok, suspend function will stop the thread and another thread from the queue will be inserted in the ThreadPool.
In fact, I want to know if I pause the thread, will this paused thread be put in the queue and let another thread execute ?
0
ShazbotOKCommented:
Ah... you mean if you have a ThreadPool limit of 20 and suspend #20 can #21 execute?  I do not beleive so...

A paused thread is still a active thread with pending processing instructions... so it would count as a active thread.... HOWEVER it should not stop any of the other threads from being able to process.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.