I have a multi-threaded C++ app which does 3D rendering with the OpenSceneGraph library. I\'m planning to kick off OSG\'s render loop as a separate thread using boost::threa
I don't think you need a fully fledged mutex here -- though the render thread will need to busy wait in the 'suspended' state if you aren't using a synchronization object that supports a wait primitive.
You should look into using the various interlocked exchange primitives though (InterlockedExchange under Windows). Not because read/writes from the bool are non-atomic, but to ensure that there are no weird behaviours the compiler reordering memory accesses on a single thread.