Windows Service And Thread Programming .NET

Posted by Raghu on Stack Overflow See other posts from Stack Overflow or by Raghu
Published on 2009-12-23T12:06:50Z Indexed on 2010/05/21 1:10 UTC
Read the original article Hit count: 254

I have developed windows service to process files whose records will be stored in database. When windows service finds a file it creates a thread and assigns each file to one thread. I have not used Thread Pool. I wanted to know when windows service is stopped, then how to identify how many threads are running and whether they are complete. If all the threads are executed then windows service can be stopped successfully. Otherwis windows service should wait until all threads are executed or aborted. How to implement this.

© Stack Overflow or respective owner

Related posts about threads

Related posts about .net-3.5