Hi Adam, On 9/24/07, Adam Coates <[EMAIL PROTECTED]> wrote: > It looks like there's still a problem with the current setup. The > Thread object itself can get deleted before the pthread actually gets > to the lock (which, I guess is what you just added).
If I understand correctly you are saying that the Thread object is being deleted before the static StartThread function gets called. In this case its rather an awkward problem to solve. Perhaps one could have lock made in the Thread::startThread method that is unlocked by the static StartThread function once it's complete. > While it looks > like this doesn't cause a crash, the problem is evidenced by valgrind > (reports uninitalized memory reads/writes to the lock -- which got > freed by the Thread destructor). > > You seem like you're pretty busy, so if you want, I can take a crack > at this -- I think the Thread code is simple enough, but I'll need to > think a bit to figure out how to get around this. One (simple) > solution is to just join() the thread from the ~Thread() destructor. I expect the valgrind warnings are unrelated to this start problem. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

