Advanced Processing

We have added threads, processing, and other features to the service. However, although a synchronous process may suffice, what if we had multiple directories with incoming files, or what if we want to speed up the processing? If we had a larger number of files in the incoming folder, with possibly a larger amount of data in those files, we may want to make the service more efficient.

Before you go any Further, understand that the more threads and actions you add to your service, the more care you have to take. For example, if you have multiple actions happening that all use the same data, it’s very easy to corrupt the data on a separate thread from the one actively using that data.

You get around this issue by synchronizing ...

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.