|
OpenWalnut
1.2.5
|
Class implementing a simple worker thread, since proper testing of WThreadedRunner itself is not usable. More...
#include <WThreadedRunner_test.h>
Inheritance diagram for WThreadedRunnerImpl:Protected Member Functions | |
| virtual void | threadMain () |
| Function that has to be overwritten for execution. | |
Protected Member Functions inherited from WThreadedRunner | |
| virtual void | notifyStop () |
| Gets called when the thread should be stopped. | |
| void | yield () const |
| Give remaining execution timeslice to another thread. | |
| void | sleep (const int32_t t) const |
| Sets thread asleep. | |
| void | msleep (const int32_t t) const |
| Sets thread asleep. | |
| void | waitForStop () |
| Let the thread sleep until a stop request was given. | |
Friends | |
| class | WThreadedRunnerTest |
Additional Inherited Members | |
Public Types inherited from WThreadedRunner | |
| typedef boost::function< void(void) > | THREADFUNCTION |
| Type used for simple thread functions. | |
Public Member Functions inherited from WThreadedRunner | |
| WThreadedRunner () | |
| Default constructor. | |
| virtual | ~WThreadedRunner () |
| Destructor. | |
| virtual void | run () |
| Run thread. | |
| void | run (THREADFUNCTION f) |
| Run thread. | |
| void | wait (bool requestFinish=false) |
| Wait for the thread to be finished. | |
| virtual void | requestStop () |
| This method's purpose is to request a stop without waiting for it. | |
Protected Attributes inherited from WThreadedRunner | |
| boost::thread | m_thread |
| Thread instance. | |
| WBoolFlag | m_shutdownFlag |
| Condition getting fired whenever the thread should quit. | |
Class implementing a simple worker thread, since proper testing of WThreadedRunner itself is not usable.
Definition at line 37 of file WThreadedRunner_test.h.
|
inlineprotectedvirtual |
Function that has to be overwritten for execution.
It gets executed in a separate thread after run() has been called.
Reimplemented from WThreadedRunner.
Definition at line 45 of file WThreadedRunner_test.h.
References WThreadedRunner::m_shutdownFlag, and WThreadedRunner::sleep().
1.8.1