Seeing jobs spawned by PhysicsSystem::Update
execute after that function has returned
#1523
-
A comment above
However, using I'm not adding any jobs to Is this expected? There is a lot of complexity in Jolt here, so I haven't dug in further yet, but I can try to if that's helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Job is considered 'complete' when the 'Execute' function has returned (or actually a few instructions before returning). So yes, you can see that the threads are still doing some clean up work, but the actual work has been done when If you see callstacks that actually call into |
Beta Was this translation helpful? Give feedback.
The Job is considered 'complete' when the 'Execute' function has returned (or actually a few instructions before returning).
JobSystemThreadPool
however still needs to callRelease
to free the job before it can go to sleep. It is also possible that the main thread has stolen work in which caseExecute
will be called again on another thread. In this case the Job will do nothing because it is already in the 'done' state.So yes, you can see that the threads are still doing some clean up work, but the actual work has been done when
PhysicsSystem::Update
completes.If you see callstacks that actually call into
PhysicsSystem::Job*
afterPhysicsSystem::Update
finishes, then something is wrong a…