ThreadDispatcher implementation (application freezes) #198
-
Hello! I'd like to quickly ask if my implementation of ThreadDispatcher is correct, because when I run DispatchThread the app it throws an error (workerBody is null)... Could you please help? I hope it doesn't take too long to figure out what's wrong...
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
At a glance, nothing jumps out as wrong. That looks pretty close to the default Is it possible that |
Beta Was this translation helpful? Give feedback.
At a glance, nothing jumps out as wrong. That looks pretty close to the default
BepuUtilities.ThreadDispatcher
implementation, reordered, plus some nullability annotations.Is it possible that
DispatchWorkers
is being called at the same time from multiple threads? That implementation is not reentrant, so that would definitely cause problems.