-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language Clarification: Concurrently accessing the physics simulation #95
Comments
The simulation runs across many threads (doesn't matter if you kick it from the main thread or another thread, it will use that thread and as many other threads as you give it - this is abstracted in the JobSystem class with JobSystemThreadPool as a possible implementation). The text above is talking about what happens outside of the physics simulation: You can manipulate bodies and perform collision queries from many threads at the same time. |
Ok. So the main physics loop can exist on the application's main thread, or continuously running on its own thread, and it can be handled just fine provided it has interface access to the application's thread-pool implementation. |
Correct. I'm assuming b.t.w. that 'continuously running' means that the thread continuously runs, not the simulation. During PhysicsSystem::Update the physics system is locked, so other threads cannot read/modify any state. Outside of the PhysicsSystem::Update multiple threads can access and modify the simulation data if you want. |
Gotcha, gotcha. That basically answers the question. So I'm gonna go ahead and close the thread. |
Just asking for a clarification here, as the language makes it a bit confusing. Is Jolt intended to be run on it's own thread, while sharing a thread pool with the main application thread. Or is it designed to run on the main application thread.
The text was updated successfully, but these errors were encountered: