CTX_Base :: 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 process_all 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 process_all as true.
The function will not handle immediate threads, which must be handled by overloaded context functions in the application.
Return value: Success ( logical )