#include "ThreadedWorker.h" #include #include ThreadedWorker::ThreadedWorker() : _done(false) { OSG_ALWAYS<<"ThreadedWorker instantiated."< lock(_threadWorkerMutex); if( _threadWorker.valid() ) (*_threadWorker)(this); } while (_threadWorker!=NULL && !testCancel() && !_done); // repeat as long as a functor is set and it is not canceled or set as Done } void ThreadedWorker::setDone(bool done) { _done = done; } int ThreadedWorker::cancel() { OSG_ALWAYS<<"Cancelling ThreadedWorker "<