Multithreading Saga Continued...
This week I grappled with Unreal Engine multithreading some more. I'm trying to make the terrain generation as efficient as possible for the planets, and that has consisted of lots of trial and error, and several rewrites, which means learning! I came across this great Unreal Fest Gold Cost talk from 2024 which explains UE multithreading and how to use it. I'm surprised I hadn't come across this before because it has lots of great info. The biggest revelation I had was that I was using the wrong method of multithreading for what I wanted to do. Before this week I was using an FRunnable to calculate the terrain. In the talk however, Alex explains that these FRunnable s are meant for larger lifecycle tasks and are intended to be kept running. For my use-case though I want more fire and forget type functionality. Give a thread some info, let it run its calculations, and give the resulting data back to the game thread whenever it's done...