J
John A Grandy
I have implemented a Windows Service ( ServiceBase ).
My service calls a a 3rd-party lib that initializes & initiates a process
that continually provides data via a callback in my service.
In the callback, the provided data is written to files and tracking data is
written to db.
In ServiceBase.OnStop() I need to do some files/db cleanup.
I am finding that my service continues to process callbacks even after
OnStop() has been entered.
So, the sequence is :
1. start service
2. call into service
3. service initiates 3rd party lib
4. service processes callbacks
5. stop service
6. OnStop() is triggered
7. run cleanup
8. callbacks processing continue for a bit
9. service stops
So, the net result is that my cleanup can never been complete.
How do I "have the last word" before my service shuts-down ?
Thanks.
My service calls a a 3rd-party lib that initializes & initiates a process
that continually provides data via a callback in my service.
In the callback, the provided data is written to files and tracking data is
written to db.
In ServiceBase.OnStop() I need to do some files/db cleanup.
I am finding that my service continues to process callbacks even after
OnStop() has been entered.
So, the sequence is :
1. start service
2. call into service
3. service initiates 3rd party lib
4. service processes callbacks
5. stop service
6. OnStop() is triggered
7. run cleanup
8. callbacks processing continue for a bit
9. service stops
So, the net result is that my cleanup can never been complete.
How do I "have the last word" before my service shuts-down ?
Thanks.