I have a service written in VB.Net 2.0 that watches a folder for text
files and, when a text file is placed in the folder, moves it elsewhere
and processes it. I would like to optimize the service by putting each
document on its own worker thread.
My main question is: what would happen if a service shut-down command is
issued and there are pending threads? I am hoping that the service will
wait until all of the worker threads have terminated before shutting
down, but I fear it won't be that easy. Any suggestions -- or better,
code examples available on the web -- would be much appreciated.
--
Gregory Gadow