diff --git a/examples/osgunittests/osgunittests.cpp b/examples/osgunittests/osgunittests.cpp index e758b2fa6..e061d5b8e 100644 --- a/examples/osgunittests/osgunittests.cpp +++ b/examples/osgunittests/osgunittests.cpp @@ -412,7 +412,49 @@ void testQuat(const osg::Vec3d& quat_scale) class MyThread : public OpenThreads::Thread { public: - void run(void) { } + void run(void) { } +}; + +class NotifyThread : public OpenThreads::Thread { +public: + + NotifyThread(osg::NotifySeverity level, const std::string& message): + _done(false), + _level(level), + _message(message) {} + + ~NotifyThread() + { + _done = true; + while(isRunning()) + { + OpenThreads::Thread::YieldCurrentThread(); + } + } + + void run(void) + { + std::cout << "Entering thread ..." <<_message<< std::endl; + + unsigned int count=0; + + while(!_done) + { + ++count; +#if 1 + osg::notify(_level)<<_message<