Use mutexes and atomic counters in places identified by Thread Sanitizer.
Also fixes a potential crash that would occur when at the end of a frame D_EndFrame() was being called during busy mode, accessing player data that was being cleared in another thread.
Fixed: Improved thread-safety
Use mutexes and atomic counters in places identified by Thread
Sanitizer.
Also fixes a potential crash that would occur when at the end of a
frame D_EndFrame() was being called during busy mode, accessing
player data that was being cleared in another thread.