company logo

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  )

Implementation details

logical CTX_Base  :: StopThread ( logical process_all )
  • process_all - 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.