Thread

Soft thread cancelling method. Non blocking method to ask the thread to stop instead of cancelling it.

This is the proper way to let the thread know that it should stop running. Thus it can terminate its critical work, before exiting. Hence this method does not make the thread stop, it does ask it to stop in the hope it will be heard: if the thread does not invoke the stopDemanded() method systematically, it will never know about this request.

start() method:

 ...
 while ( ! stopDemanded() )
 {
     // do my job
     ...
 }
 ...
 
See also:
cancel()
Generated on Mon Nov 29 13:38:22 2010 for Ceylan by  doxygen 1.6.3