PC Review


Reply
Thread Tools Rate Thread

how to cancel a thread that is in threadpool

 
 
=?Utf-8?B?QW5vbg==?=
Guest
Posts: n/a
 
      10th Apr 2004
Hi

I would like to cancel or abort the execution of a thread that has been added to the queue of the threadpool. It seems that once it has been added, I don't have any access or control over it. Any help is appreciated

Regards

A
 
Reply With Quote
 
 
 
 
Tom Shelton
Guest
Posts: n/a
 
      11th Apr 2004
On 2004-04-10, Anon <(E-Mail Removed)> wrote:
> Hi,
>
> I would like to cancel or abort the execution of a thread that has been added to the queue of the threadpool. It seems that once it has been added, I don't have any access or control over it. Any help is appreciated.
>
> Regards,
>
> A


You can't... The most you can do with a thread pool thread is set a
flag that the thread has access to that tells it to abort.

The threadpool class is best uses with short lived jobs that don't
require much user interaction If you need better control of the
threading process, your much better off using a System.Threading.Thread
object.

--
Tom Shelton [MVP]
Powered By Gentoo Linux 1.4
An Ada exception is when a routine gets in trouble and says
'Beam me up, Scotty'.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
From Thread to ThreadPool Charlie Brown Microsoft VB .NET 6 23rd Feb 2009 05:14 PM
New Thread or ThreadPool? Curious Microsoft Dot NET 9 13th Jun 2008 08:37 PM
Use Thread or ThreadPool Simon Microsoft C# .NET 4 15th Oct 2007 04:30 PM
Per-thread-pool-thread data using ThreadPool class travislspencer@gmail.com Microsoft Dot NET Framework 0 12th Apr 2007 05:57 AM
ThreadPool VS Thread Sin Jeong-hun Microsoft Dot NET 7 28th Feb 2007 11:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 AM.