Monitoring with Multiple Threads

We have successfully created a multithreaded polling service, which can be very useful, if you had to monitor more than one directory; for example, you could either have one thread monitor all the directories, or you could create multiple threads, using one per directory. You could also create a pool of threads, monitoring not only file system directories but also FTP folders and MSMQ queues so you could make sure that the proper thread handles the correct source and processing occurs correctly.

Expanding Processing

For this example, we will expand the service. We will monitor the incoming directory for files and then move these files to a newly created output directory. Although we don’t process these files directly, ...

Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.