-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Too easy to cancel
inactive Tasks
#884
Labels
Comments
This was referenced Jan 19, 2020
kakoc
pushed a commit
to kakoc/yew
that referenced
this issue
Jan 26, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` and delegate such logic to `Drop` stage.
kakoc
added a commit
to kakoc/yew
that referenced
this issue
Jan 26, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` trait and delegate such logic to `Drop`.
kakoc
added a commit
to kakoc/yew
that referenced
this issue
Jan 26, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` trait and delegate such logic to `Drop`.
kakoc
added a commit
to kakoc/yew
that referenced
this issue
Jan 26, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` trait and delegate such logic to `Drop`.
kakoc
added a commit
to kakoc/yew
that referenced
this issue
Jan 27, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` trait and delegate such logic to `Drop`.
jstarry
pushed a commit
that referenced
this issue
Jan 28, 2020
In order to avoid misuse It was decided to remove `cancel` from `Task` trait and delegate such logic to `Drop`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
The
Task
interface has a method calledcancel
which is intended to allow devs to cancel long running tasks. However, this API is easy to misuse accidentally. For example, our examples encourage risky usage here and here. These are risky because the task should first be check usingis_active()
before canceling.Related to #371
Proposed behavior
We should rely on
Drop
to cancel the task and remove thecancel
method from theTask
interface.The text was updated successfully, but these errors were encountered: