TLDR - just looking for some better explanation of FTickFunction::bRunOnAnyThread
Motivation/Context:
I’m creating a custom movement component which does a lot of math calculation during each tick.
I’m a little bit worried that said component might be too heavy and can possibly lock MainThread for a long time causing stuttering or frame drops. I’m not seeing any performance issues at the moment, but who knows what will happen later during development when I’ll be using it for thousands components.
I’ve started thinking about possible solutions to the problem mentioned above, which includes parallelism of my calculations.
Question:
While reading about how ticking works in general - I looked into source code, and found the following flag in the FTickFunction :
/** If false, this tick will run on the game thread, otherwise it will run on any thread in parallel with the game thread and in parallel with other "async ticks" **/
uint8 bRunOnAnyThread:1;
What “it will run on any thread in parallel
” actually means here?
Would tick calls for the same FTickFunction run on multiple thread workers at the same time? or does it mean that these ticks will be queued on a different thread but without further parallelization between them?
Can I get some further explanation on this ?