Solved

Shutting down a thread pool contained in a windows service.

Posted on 2003-12-04
1
306 Views
Last Modified: 2010-04-16
I'm building a windows service in c# that has a thread pool being used to process messages from an MSMQ.  A new thread is created by a manager thread to process each message fed by an asyncronous reader reading the queue.

My question is... how do I allow the user to shutdown the thread pool in a graceful manner?

My current thinking is that I stop the reader and then to wait until all threads in the pool have completed.  The bit I'm stuck on exactly how to do this so would very much appreciate some assistance.
0
Comment
Question by:neviljer
1 Comment
 
LVL 24

Accepted Solution

by:
shivsa earned 250 total points
ID: 10181278
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now