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

What Is Thread Cleanup?

We have now expanded the code so that we can call methods on the class and/or code within thread functions. However, we have not yet made it possible to clean up the threads if the user were to stop the service while the threads were actively processing. We need to have control over the cleanup of the threads because unlike applications that run on the client, services are required to either shut down quickly or update the Service Control Manager with an estimate of how much longer the services need to shut down. If the Services does not request more time, the SCM will consider the service to be in a hung or unresponsive state, which will most likely require a reboot of the system. In some cases you can look in Task Manager ...

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