I first got the deadlock on linux and only in release builds. On windows I was 
able to reproduce it by placing a 1ms sleep line 403. Adding cancel helps but 
then the thread will not do any clean up and valgrind spits out a 1mb log file 
complaining about memory leaks. It's better to try to fix the deadlock than 
doing a cancel.

For scenario one it should be possible to rearrange the code a little to make 
it work.
For scenario two, a Operation should have a method that will invalidate it so 
it won't block any more. I have searched the code and have found 3 kinds of 
Operations:
- BlockOperation: this one is invalidated by calling release, but can become 
blocking again is you call reset() or set(false).
- BarrierOperation: this is where the deadlock occurs. But Barriers can be 
invalidated by calling invalidate() but there is currently no way to make them 
blocking again if you want to reuse them later.
- GraphicsOperation: the release method of this one is empty already, it is 
stopped by calling setDone() when stopThreading is called.

Cheers,
Pjotr

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61521#61521





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to