Files
UnrealEngineUWP/Engine/Source/Programs/UnrealBuildTool/System
russell johnston 32e3ad93e8 Coroutine suspend and resume
A new VTask object tracks a chain of the VFrames, from the point where the task was spawned to the point where it suspended. This task boundary is recorded by a pair of BeginTask/EndTask instructions. Individual <suspends> function calls in the new VM do not have distinct tasks, and <suspends> does not change how bytecode is generated.

Native functions may suspend the current task by returning a new FOpResult of kind Yield, at which point the current PC is saved to the VTask, its VFrames are detached from the stack, and execution continues in the parent task. Native code may resume a task with a new VTask::ResumeInTransaction API, which re-attaches these VFrames to the top of the stack and continues execution from the saved PC.

VNI functions continue to use the verse::continuation API, which now wraps a VTask pointer and thus must be accounted for during GC tracing.

#rb Markus.Breyer, saam.barati
#okforversepublic

[CL 30978163 by russell johnston in ue5-main branch]
2024-01-29 16:43:30 -05:00
..
2023-12-06 19:03:56 -05:00
2024-01-26 08:22:07 -05:00