Hi,

Robert Osfield wrote:
Hi J.P,

On Fri, May 23, 2008 at 9:16 AM, J.P. Delport <[EMAIL PROTECTED]> wrote:
I've reviewed all the places that read and write the
RequestQueue::_requestList and they
all look like they acquire the _requestMutex before they use the list.
are all the acquires from different threads? I have not checked lately, but
there used to be a difference between Win/Lin wrt taking mutexes
recursively. Win allowed recursive if the call was from within the same
thread, Lin did not.

I believe this is still true w.r.t Windows allowing recursive mutexes,
while pthreads
doesn't.  However, I doubt this is relevant to the instability under
Windows, as the
code started out under Linux, if code was such that a single thread was entering
the same mutex then Linux would just deadlock, unable to acquire the same mutex
twice.  I'm not getting deadlocks.

Yes, you are right for the case where a lock is only released by the same thread that acquired it. This is the normal use case that e.g. scopedlock enforces.

I have through undisciplined use of mutexes (not implying OSG does any of this :-) created cases where the Linux version just blocks (not deadlocks) and the Windows version runs right through.


Perhaps one things that is being stressed more know is the general thread safety
osgDB::Registry and the plugins, as the new DatabasePager allows multiple loads
to be running in a parallel.

Yes, I also wish there was an easy wrapper around OpenThreads to help one debug the multi-threaded execution.

jp


Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
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

Reply via email to