History

tweak

Seth Alves committed 11 years ago

Commit fcbb1071 parent 8b72f6e3 files · +9 −8Browse files

Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 3 files). Show all

Unified · Split

libraries/physics/src/ObjectActionSpring.cpp+1−2
@@ -38,6 +38,7 @@ ObjectActionSpring::~ObjectActionSpring() { · 37 unmodified lines
38}38}
39 39
40void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) {40void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) {
41 // don't risk hanging the thread running the physics simulation
41 auto lockResult = withTryReadLock([&]{42 auto lockResult = withTryReadLock([&]{
42 auto ownerEntity = _ownerEntity.lock();43 auto ownerEntity = _ownerEntity.lock();
43 if (!ownerEntity) {44 if (!ownerEntity) {
@@ -100,9 +101,7 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) { · 56 unmodified lines
100 }101 }
101 });102 });
102 if (!lockResult) {103 if (!lockResult) {
103 // don't risk hanging the thread running the physics simulation
104 qDebug() << "ObjectActionSpring::updateActionWorker lock failed";104 qDebug() << "ObjectActionSpring::updateActionWorker lock failed";
105 return;
106 }105 }
107}106}
108 107