O'Reilly logo

Programming Windows® Services with Microsoft® Visual Basic® 2008 by Michael Gernaey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required