Revision: 8899
http://playerstage.svn.sourceforge.net/playerstage/?rev=8899&view=rev
Author: hsujohnhsu
Date: 2010-09-13 22:21:20 +0000 (Mon, 13 Sep 2010)
Log Message:
-----------
moving time update inside same model rendering and deletion mutex lock as
world->update() call. this is motivated by potentially synchronizing camera
sensor update call.
Modified Paths:
--------------
code/gazebo/trunk/server/Simulator.cc
Modified: code/gazebo/trunk/server/Simulator.cc
===================================================================
--- code/gazebo/trunk/server/Simulator.cc 2010-09-13 07:45:52 UTC (rev
8898)
+++ code/gazebo/trunk/server/Simulator.cc 2010-09-13 22:21:20 UTC (rev
8899)
@@ -483,7 +483,7 @@
/// Set whether the simulation is paused
void Simulator::SetPaused(bool p)
{
- boost::recursive_mutex::scoped_lock lock(*this->GetMRMutex());
+ boost::recursive_mutex::scoped_lock model_render_lock(*this->GetMRMutex());
if (this->pause == p)
return;
@@ -553,7 +553,7 @@
////////////////////////////////////////////////////////////////////////////////
void Simulator::SetStepInc(bool step)
{
- boost::recursive_mutex::scoped_lock lock(*this->GetMRMutex());
+ boost::recursive_mutex::scoped_lock model_render_lock(*this->GetMRMutex());
this->stepInc = step;
this->stepSignal(step);
@@ -671,23 +671,23 @@
{
//DiagnosticTimer timer("PhysicsLoop Timer ");
+ {
+ boost::recursive_mutex::scoped_lock
model_render_lock(*this->GetMRMutex());
+ boost::recursive_mutex::scoped_lock
model_delete_lock(*this->GetMDMutex());
- currTime = this->GetRealTime();
+ currTime = this->GetRealTime();
- userStepped = false;
- if (this->IsPaused())
- this->pauseTime += step;
- else
- this->simTime += step;
+ userStepped = false;
+ if (this->IsPaused())
+ this->pauseTime += step;
+ else
+ this->simTime += step;
- if (this->GetStepInc())
- userStepped = true;
+ if (this->GetStepInc())
+ userStepped = true;
- lastTime = this->GetRealTime();
+ lastTime = this->GetRealTime();
- {
- boost::recursive_mutex::scoped_lock lock(*this->GetMRMutex());
- boost::recursive_mutex::scoped_lock
model_delete_lock(*this->GetMDMutex());
world->Update();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit