kphp icon indicating copy to clipboard operation
kphp copied to clipboard

add fork support in runtime light

Open astrophysik opened this issue 1 year ago • 0 comments

Fork support in runtime light

This pr add fork and wait functions in runtime light. The main difference from forks in the master is the use of C++20 coroutines

Overiew

The class that stores the current state of the forks is KphpForkContext. It contains fork_scheduler, which is responsible for executing forks. In the schedule function it tries to execute all possible coroutines, if the main fork runs out or there are no forks available for execution the component is blocked.

The fork stored in the light_fork class. It stores a pointer to the first coroutine frame and the last interrupt point. The fork_result type erasue class is used to store the result.

astrophysik avatar Jun 27 '24 06:06 astrophysik