Returning values from another thread
Basically I am trying to make a function that takes parameters on another thread because it is relatively expensive, then return an output value to the game thread I found Rama's wiki thread very helpful (https://wiki.unrealengine.com/Multi-Threading:_How_to_Create_Threads_in_UE4) but it did not cover how to get the values calculated back to the game thread.
How would I go about this?
asked Aug 25 '14 at 11:24 PM in C++ Programming
If you look at this section of my tutorial
The TArray is actually stored in the pc class, just avoid accessing it in the game thread until the other thread has finished filling it!
and never use ranged for loops when doing fancy stuff like this, use the standard for loop, so you check the length each time :)
Follow this question
Once you sign in you will be able to subscribe for any updates here