BaseContext :: stopThread - Stop action thread
The function can be overloaded in the specialized context to stop running threads. The specialized context should call the StopThread() function from its base class, which will stop the waiting threads.
This implementation ensures, that all waiting threads will stop before the context object is destroyed. Passing bProcessAll as false (default) causes the function to wait until the running waiting thread stops. Other waiting threads in the queue will be processed only, when passing bProcessAll as true.
The function will not handle immediate threads, which must be handled by overloaded context functions in the application.
When the context handle does not refer to a valid context instance the function throws an exception.
Implementation details
- bProcessAll
- Process all waiting threads
All waiting threads in the queue will be processed before stopping, when passing true. When passing false, threads are stopped immediately.