The function tells the scheduler to stop it's work.
This function whould be called from another thread to tell the working thread that it stop working. The function sets a flag which marks the end of work.
It would be called from the OnStop method which receives the stop command from windows service management.
Scheduler Class | uws Namespace | Service