I tried to use a ThreadPool to do some noise calculations. It didn’t do what i wanted to do. And since there is few info about ThreadPool i switched to FFunctionGraphTask.
Now the Problem is i need to fill an TArray with Data. But i read that its not ThreadSafe…
ChunkInitTasks.Add(FFunctionGraphTask::CreateAndDispatchWhenReady([&, data, CurrentPosition]()
data is the TArray, CurrenPosition is not used at the Moment. Is there a way to fill the Array with data, that i can use after the Tasks finished in GameThread? At the Moment the Editor Crashes when i fill the Array
FChunkData containes a TArray which holds the Data of each Element in the Chunk