#include <mcllib/MCRunnable.h>
Inheritance diagram for MCRunnable:
Public Member Functions | |
virtual bool | run ()=0 |
Interface to runnables. | |
virtual | ~MCRunnable () |
Allow virtual delete. |
When the run() function return the thread exits. Typical usage is
class MyRunnable : public MCRunnable { public: virtual bool run() { ... do some work ... return true; } } MCThread thr("test"); // create a thread object thr.start(new MyRunnable); // start the thread running (calls run()) thr.join(); // wait for the run() function to complete
|
Interface to runnables. The implementation must override the run function. The framework calls run when the thread has been started. The status returned from the run function indicates success or failure.
|