From 1c79798583267f86b054b391614ddfcf7cf376f4 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 12 Jan 2017 08:06:40 -0800 Subject: [PATCH] make sure threads will get out of 'workerThreadWait' so they can exit at the end --- examples/SharedMemory/PhysicsServerExample.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/SharedMemory/PhysicsServerExample.cpp b/examples/SharedMemory/PhysicsServerExample.cpp index 5b6588daf..4fe4eea38 100644 --- a/examples/SharedMemory/PhysicsServerExample.cpp +++ b/examples/SharedMemory/PhysicsServerExample.cpp @@ -1246,6 +1246,9 @@ void PhysicsServerExample::exitPhysics() { b3Clock::usleep(1000); } + //we need to call 'stepSimulation' to make sure that + //other threads get out of blocking state (workerThreadWait) + stepSimulation(0); }; printf("stopping threads\n");