Bug with high core count

Hi there,
I’m testing out Flax engine, building it from source, and faced an issue loading some of the samples.
FirstPerson one loaded fine but others, like Third person would lock with white screen.
I debugged it and narrow it down to the level load service.

Looks like the threading is hanging, since I have a high core count machine (thread ripper 32 cores/64 threads). Some levels having more assets to load there must be some jobification issue.

I was able to fix the issue by raising PLATFORM_THREAD_LIMIT to 128, but not sure why. Since this define controls some array sizes there may be some hidden stamping going on, but I’m new to the engine so not sure.


Fixed in Disable dynamic buckets in `ThreadLocal` on non-Desktop platforms tha… · FlaxEngine/FlaxEngine@f9ca69d · GitHub.

Now, even if PLATFORM_THREAD_LIMIT is 4 and CPU has 128 cores, the engine will work fine.

Thanks, can confirm it works for my setup.