In my case, GameThread is launching a worker thread that runs indefinitely(i.e. until we manually send a close/shutdown command). There are few resources shared between this worker thread and GameThread. Code of my worker thread and GameThread related to this FPlatformProcess::Sleep(0) looks like this;
// worker thread, launched by GameThread
while(condition is not met)
// do something with var now that the condition is met
void SomeFunction() // this get's called every Tick()
var++; // when var reaches 10, condition on worker thread is met
So, in this case, am I right in understanding that worker thread does not block GameThread, but instead waits until the condition is met. So, in a way FPlaformProcess::Sleep(0) is a non-blocking way of synchronization between two threads?