Hi Stefan,
Stefan Eilemann wrote:
Hi JP,
On 15. Feb 2010, at 9:00, J.P. Delport wrote:
if I remember correctly, the ReentrantMutex came into existence
because on Windows the normal Mutex was reentrant (a single thread
could lock it more than once). So ReentrantMutex was created to
make a consistent mutex on all platforms...
That may be so. The issue at hand is that the ReentrantMutex on
pthreads only works if your threads are created using OpenThreads (it
uses Thread::CurrentThread() which requires some TLS created by
Thread::start()). Since in my case the render threads are already
running, this mutex deadlocks. A plain Mutex doesn't need all this
and works correctly.
OK, I understand the issue better now. I've also had some issues with
boost::thread and osg::Viewer:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/52734
Hopefully some of the issues would be addressed by the thread
functionality in C++0x :)
jp
In this use case the mutex does not need to be reentrant. Obviously
it doesn't hurt if it is, so imo the change is ok.
Cheers,
Stefan.
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org