You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a task ends with an exception, we might want to propagate it to whoever last switched to that task. Some reasons: (1) A task that never yields is like a function call. (2) It's strange to yield to a task that throws an error, and get the thrown exception back as the result value. The scheduler can trap and ignore such failures, since it can't be expected to handle them.
We might want to get rid of the runnable flag. The way yield eventually returns right now is strange: the current task pulls itself out of the Workqueue, sets its own runnable flag to true, yields to itself (which is a no-op) inside perform_work, then returns since runnable is true. Clearly most of these steps can be skipped.
The text was updated successfully, but these errors were encountered:
Continuing the discussion started in #5687.
@vtjnash proposed
task.status = [UNSTARTED, RUNNABLE, NOTRUNNABLE, DONE, FAILED]
.A couple other things to discuss:
runnable
flag. The wayyield
eventually returns right now is strange: the current task pulls itself out of the Workqueue, sets its own runnable flag to true, yields to itself (which is a no-op) insideperform_work
, then returns sincerunnable
is true. Clearly most of these steps can be skipped.The text was updated successfully, but these errors were encountered: