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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access