How to delete thread from a ThreadPool

  • Thread starter Thread starter Mullin Yu
  • Start date Start date
M

Mullin Yu

As subject.

How can an main application delete/reset a thread at the ThreadPool? There's
no method provided by ThreadPool?

Thanks!
 
Hi,

ThreadPool concept does not assume its threads will be managed from outside.
I'd recommend ensuring that your work items don't have any negative impact
on the thread pool instead.
 
But, how can i reset/delete a thread if it's hanging or timeout if no
methods provided? use thread instead of threadpoll?

cheers,
mullin

Dmitriy Lapshin said:
Hi,

ThreadPool concept does not assume its threads will be managed from outside.
I'd recommend ensuring that your work items don't have any negative impact
on the thread pool instead.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Mullin Yu said:
As subject.

How can an main application delete/reset a thread at the ThreadPool? There's
no method provided by ThreadPool?

Thanks!
 
The only reason I see is that a work item you queued has caused the thread
to hang. You should fix that work item to prevent it from hanging or timing
out.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Mullin Yu said:
But, how can i reset/delete a thread if it's hanging or timeout if no
methods provided? use thread instead of threadpoll?

cheers,
mullin

Dmitriy Lapshin said:
Hi,

ThreadPool concept does not assume its threads will be managed from outside.
I'd recommend ensuring that your work items don't have any negative impact
on the thread pool instead.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Mullin Yu said:
As subject.

How can an main application delete/reset a thread at the ThreadPool? There's
no method provided by ThreadPool?

Thanks!
 
Back
Top