David Guthrie wrote on Thursday, May 07, 2009 1:50 PM:
> The Pthreads implementation of the mutex doesn't set it to be a
recursive
> mutex, so if you try to lock the same mutex on the same thread again,
it will
> deadlock.  The windows critical section, however, allows this.  It
seems like
> it would be best to mark the pthread mutex to allow recursion so that
this
> case functions the same across platforms.  Does anyone know of a
reason why
> this is NOT a good idea?     

OpenThreads implements recursive mutexes in ReentrantMutex, which lets
you use them on pthreads *and* Windows. So, it's just a cross-platform
compatibility choice.

-- 
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to