Hello, everyone,

    This is the first time I try to submit a patch, so I don't quite
understand the progress and method, so Sorry.

    But I think this may help to reduce the time that the mutex hold, it
applies to : osgGA/EventQueue.cpp

    This is using std::list::splice to replace the std::list::insert

    Thanks for everyone to say anything about it. Thank you!



Index: EventQueue.cpp
===================================================================
--- EventQueue.cpp (revision 11469)
+++ EventQueue.cpp (working copy)
@@ -53,8 +53,7 @@
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_eventQueueMutex);
if (!_eventQueue.empty())
{
- events.insert(events.end(),_eventQueue.begin(),_eventQueue.end());
- _eventQueue.clear();
+ events.splice(events.end(), _eventQueue);
return true;
}
else
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to