Is Bullet Reentrant?
-
- Posts: 7
- Joined: Fri May 16, 2008 8:01 am
Is Bullet Reentrant?
Just a simple question: is the library reentrant? Assuming I protect shared data structes like my btDiscreteDynamicsWorld from concurrent access, can I create rigid bodies and shapes concurrently?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Is Bullet Reentrant?
Yes, you can create rigid bodies and shapes in parallel, but adding/removing them from the world should be done sequential, if you have a single btDiscreteDynamicsWorld.
Can you explain more in detail how you want to use Bullet?
Thanks,
Erwin
Can you explain more in detail how you want to use Bullet?
Thanks,
Erwin
-
- Posts: 7
- Joined: Fri May 16, 2008 8:01 am
Re: Is Bullet Reentrant?
The program has several network clients connecting to a central server each doing a lot of lengthy operations (most of which can happily be executed concurrently), some of which include adding objects to the bullet world. Instead of queuing the operations (which scaled badly and affected latency) it is set up so that each client is run concurrently.
Thanks for your reply, We've structured it so that all actions that modify the world are mutexed however we have let read operations (such as reading WorldTransforms) happen concurrently (Although not at the same time as writes, obviously). Is this likely to cause a problem? (Maybe static temporary data is used in some read functions?)
Thanks again.
P.S I saw a reference to a multi-threaded version of bullet. I assume thats so that the solver can run on multiple cores/cpu's?
Thanks for your reply, We've structured it so that all actions that modify the world are mutexed however we have let read operations (such as reading WorldTransforms) happen concurrently (Although not at the same time as writes, obviously). Is this likely to cause a problem? (Maybe static temporary data is used in some read functions?)
Thanks again.
P.S I saw a reference to a multi-threaded version of bullet. I assume thats so that the solver can run on multiple cores/cpu's?