I’m trying to create threads.
I actually think they are created correctly.
If I run them this way there is no problem, and I can see that the thread ids are different numbers.
virtual uint32 Run() override
{
if (Thread!=nullptr)
Message::Warning("ThreadID --> "
+ FString::FromInt(Thread->GetThreadID()));
return 0;
}
However when I run them this way the whole game freezes.
virtual uint32 Run() override
{
while (bRunThread)
{
FPlatformProcess::Sleep(1.0f);
}
return 0;
}
I think FPlatformProcess::Sleep is sleeping on the game thread too…
But in theory this should not happen. All the examples I have seen use FPlatformProcess::Sleep inside the Run() function.
Does anyone know what the problem could be?
Thank you so much!!
Has anyone had the same problem…
but I can’t find a solution on the forum