Skip to content

add special Reset class to implement tail calls#145

Merged
achille-roussel merged 3 commits intomainfrom
raise-reset
Apr 2, 2024
Merged

add special Reset class to implement tail calls#145
achille-roussel merged 3 commits intomainfrom
raise-reset

Conversation

@achille-roussel
Copy link
Contributor

This PR adds a new Reset type which is intended to be used to allow resetting the current coroutine execution to a different pair of function and arguments.

In the inner layers of the SDK, this construct gets turned into a tail call with a temporary error status to communicate the failure to the scheduler (and apply back-pressure) while also changing the input arguments.

Signed-off-by: Achille Roussel <[email protected]>
Signed-off-by: Achille Roussel <[email protected]>
@achille-roussel achille-roussel added the enhancement New feature or request label Apr 2, 2024
@achille-roussel achille-roussel self-assigned this Apr 2, 2024
@achille-roussel achille-roussel merged commit 34b6f47 into main Apr 2, 2024
@achille-roussel achille-roussel deleted the raise-reset branch April 2, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants