Hi, Any ideas on gracefully stopping a windows service with mutli-threaded processing on a timer thread? Is it possible to add some infinite loop logic in the OnStop method to postpone the service shutting down.
views:
106answers:
2
A:
You have to handle cancellation of the threads in your service in the OnStop()
method.
Try some logic with ManualResetEvent
or AutoResetEvent
You probably also have to stop your timer.
Jens Granlund
2010-04-27 07:59:52