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

redesign Task states #5736

Closed
JeffBezanson opened this issue Feb 8, 2014 · 0 comments
Closed

redesign Task states #5736

JeffBezanson opened this issue Feb 8, 2014 · 0 comments

Comments

@JeffBezanson
Copy link
Member

Continuing the discussion started in #5687.

@vtjnash proposed task.status = [UNSTARTED, RUNNABLE, NOTRUNNABLE, DONE, FAILED].

A couple other things to discuss:

  • 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.
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

No branches or pull requests

1 participant