You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Bind the `task` class to `VTask` with a native `Await` method. For tasks created before this binding, `VTask` uses a trivial emergent type and shape, so code that runs in this context (i.e. module top-levels) does not support structured concurrency. Each `sync` arm spawns a new task, and the overall expression `Await`s each of them in turn to collect their results. These tasks may need to remain active when the outer `sync` expression suspends, which conflicts with the way lenient suspension forcibly suspends child tasks - to resolve this, suspenion no longer affects child tasks (in fact child tasks are no longer tracked at all) and instead `EndTask` (really any time the current task changes) must check for an already-suspended `YieldTask`. Also adjust the bytecode of `for` loops so that the body runs outside of any failure context, rather than forwarding failures. This enables `<suspends>` calls in `for` loop bodies. #rb Markus.Breyer [CL 32277546 by russell johnston in ue5-main branch]