Hello,
we have encountered an issue of FStreamableManager::RequestAsyncLoad() being GameThread-only. That forces some code to GT without otherwise good reason. For example the PrepareData stage of PCG executes on GT for some nodes only due to RequestAsyncLoad.
Do you have any plans about supporting async loading from threads? And what is your recommendation for handling it? Simply defer the loading to GT?
Thanks,
Jiri
[Attachment Removed]
Hi Jiri,
Sorry for the late answer.
We delegate to the GT to launch it because that’s the limitation of that API unfortunately.
PCG is generally just a privileged user of the engine so we don’t have special hooks for this, but when and if this changes we’ll change our implementation to follow suit.
I can redirect you to a core team if you want more details, let me know!
Cheers,
Julien
[Attachment Removed]
Hi Jiri.
So it seems that while there are other ways to load packages asynchronously (ex.: LoadPackageAsync), they have their own problems related to lifetime and GC, so it seems PCG is doing the ‘blessed’ way to do it.
As far as I know (and from what I gathered from my discussion with a core engineer) is that there are no current plans to make that async.
I’ll keep a note on our end that we might want to force GT-residency only in the prepare data phase for those tasks, however.
Note that you’re free to try out for yourself the LoadPackageAsync path though - it shouldn’t be super hard to do the required changes in PCG, but YMMV.
Thanks for reaching out.
Cheers,
Julien
[Attachment Removed]
Hi,
thanks for the reply.
I know, PCG is just a client of the API.
I would like to ask if there are any plans for the core team to address it. Is it a major issue for you?
Regards,
Jiri
[Attachment Removed]