Changeset 425 for experimental/Threading/Threading/ThreadWorkerBase.h
- Timestamp:
- Oct 21, 2012, 12:05:47 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/Threading/Threading/ThreadWorkerBase.h
r422 r425 1 1 #pragma once 2 #include <osg/Referenced> 3 4 5 class ThreadedWorker; 2 6 3 7 /** … … 5 9 * 6 10 * 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 executionof the functor is completed.11 * Each execution will be completed by the thread, if the thread is set as done/canceled during a run, the cancelation will be postponed until the execution of the functor is completed. 8 12 * 9 * Note: This functor will be executed in a loop until the thread is canceled or the parameter done is set totrue.13 * Note: This functor will be executed in a loop until the thread is canceled or set as done=true. 10 14 * 11 15 * @author Torben Dannhauer 12 16 * @date Okt 2012 13 17 */ 14 class ThreadWorkerBase 18 class ThreadWorkerBase : public osg::Referenced 15 19 { 16 20 public: … … 18 22 virtual ~ThreadWorkerBase() ; 19 23 20 void operator() (bool& _threadDone); 24 virtual void operator() (ThreadedWorker* threadObject) = 0; 25 26 27 21 28 };
Note: See TracChangeset
for help on using the changeset viewer.