Aborting threads that are in-process

May 10, 2009 at 8:15 PM

I'm building  a windows service and considering using this thread pool to manage the threads.  However, the processes may be longer running (minutes versus seconds) and I need a way to be able to abort out of the processes that are "in flight" if the windows service is stopped.

I read it's possible to cancel queued (but not started) items so I can figure that out.  I haven't seen any mention, though, with what to do with "in flight" threads if the pool needs to be shut down.

Any thoughts/ideas on this?

Thanks,

Kevin

Coordinator
May 15, 2009 at 5:46 AM

Kevin,

See section 5 in the article (in the Docs folder of the source code), it explains how to cancel a work item even if it "in flight".

Ami