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

breaking: remove cancel, replace with destroy and quit #1457

Closed
shawnl opened this issue Sep 2, 2018 · 0 comments
Closed

breaking: remove cancel, replace with destroy and quit #1457

shawnl opened this issue Sep 2, 2018 · 0 comments
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@shawnl
Copy link
Contributor

shawnl commented Sep 2, 2018

#1363 discusses current rase conditions in std.event.loop. These race conditions can be addressed in user-space, however cancel is too feature-full and has introduces a race condition of its own.

This proposal is to return to what llvm gives us and remove cancel for llvm's destroy

suspend will no longer be responsible for running the defer and errdefers, and instead these will be run by destroy and quit. quit is just shorthand for destroy @handle().

It will cause undefined behavior to call destroy on a running co-routine, but in the NM scheduling model a co-routine needs to be able to destroy itself with quit: https://bugs.llvm.org/show_bug.cgi?id=38805

@shawnl shawnl changed the title remove cancel, replace with destroy breaking: remove cancel, replace with destroy Sep 2, 2018
@andrewrk andrewrk added this to the 0.4.0 milestone Sep 2, 2018
@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Sep 2, 2018
@shawnl shawnl changed the title breaking: remove cancel, replace with destroy breaking: remove cancel, replace with destroy and quit Sep 3, 2018
@shawnl shawnl closed this as completed Sep 4, 2018
@andrewrk andrewrk modified the milestones: 0.4.0, 0.3.0 Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

2 participants