source: experimental/Threading/Threading/ThreadWorkerBase.h @ 422

Last change on this file since 422 was 422, checked in by Torben Dannhauer, 12 years ago
File size: 728 bytes
Line 
1#pragma once
2
3/**
4 * \brief This class is an abstract "Thread Worker" which allows to implement tasks to be executed in a seperate thread.
5 *
6 * Just overload the operator() with your code you want to execute threaded in a loop.
7 * Each execution will be completed by the thread, if the thread is cancels during a run, the cancelation will be postponed until the execution  of the functor is completed.
8 *
9 * Note: This functor will be executed in a loop until the thread is canceled or the parameter done is set to true.
10 *
11 * @author Torben Dannhauer
12 * @date  Okt 2012
13 */ 
14class ThreadWorkerBase
15{
16public:
17        ThreadWorkerBase();
18        virtual ~ThreadWorkerBase() ;
19
20        void operator() (bool& _threadDone);
21};
Note: See TracBrowser for help on using the repository browser.