Hi guys - I couldn't find information on this anywhere: How thread-safe is the bullet API? As an example, could I create a btCollisionShape on one thread, update its local scaling on a second, and then add it to a btDyamicsWorld on a third, before say, removing it from a fourth? (Free threading)
Or do I need to be more careful? (Single-threaded only or explicit synchronization)
I'm only talking about thread safety with respect to calling the API, not synchronization that must be done on my own side (e.g. updating shared lists of rigid bodies etc).
Thread Safety in the Bullet API
-
- Posts: 14
- Joined: Fri Jun 26, 2015 4:59 pm
Re: Thread Safety in the Bullet API
Sorry to bump, but I'd really like some further insight on this one! - At the moment I'm coercing all calls through a single "master" thread just to be safe.
-
- Posts: 463
- Joined: Fri Nov 30, 2012 4:50 am
Re: Thread Safety in the Bullet API
Some files are not thread safe (especially the MLCP solvers), but most things will be safe as long as you do it before stepping. If you want heavy thread safety and multithread support, there's a great fork on github that makes everything far easier (and sometimes faster)
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: Thread Safety in the Bullet API
And there is a thread on these forums that talks about that multi-thread fork.