Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement stack unwinding for cancelled tasks #769

Open
wants to merge 16 commits into
base: theseus_main
Choose a base branch
from

Conversation

tsoutsman
Copy link
Member

@tsoutsman tsoutsman commented Dec 25, 2022

Depends on #766.

Closes #770.

Signed-off-by: Klim Tsoutsman klim@tsoutsman.com

It doesn't currently pass, but should in the near future.

Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
@tsoutsman tsoutsman marked this pull request as draft December 25, 2022 12:54
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
@tsoutsman
Copy link
Member Author

I've manually tested all three scenarios in test_task_cancel by rerunning test_task_cancel and checking log outputs.

Not sure about the naming of start_remote_unwinding.

@tsoutsman tsoutsman marked this pull request as ready for review December 26, 2022 04:20
@tsoutsman
Copy link
Member Author

Also, as discussed before, this won't be able to unwind all tasks. Should cancel_task spawn another task that, after some timeout period (e.g. 5 seconds), checks if the original task has been unwound and, if not, aborts it?

Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unwind cancelled tasks
1 participant