Skip to content

CABI: tighten subtask.cancel behavior again, add more tests - #726

Open
lukewagner wants to merge 1 commit into
mainfrom
tweak-cancel
Open

lukewagner wants to merge 1 commit into
mainfrom
tweak-cancel

Conversation

@lukewagner

Copy link
Copy Markdown
Member

This is a further refinement of #723 based on some discussion with @dicej. To keep things simple, testable and symmetric with how async lower works, subtask.cancel is returned to it's pre-#716 behavior where the only thread resumed during subtask.cancel is an implicit callback thread that's waiting in its event loop (which is the only way to receive TASK_CANCELLED atm) and then control flow deterministically transfers back as soon as the callback exits or blocks. This PR also adds a bunch of tests to confirm that nothing else is run instead of or after, and that, while running, coop-thread-switching is allowed.

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.

1 participant