-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Conditions: document that conditions can only be handled in the same task #9001
Comments
I'm wondering if this is a good thing, actually. Suppose I want to spawn a task, and execute some code that might raise condition A, B or C. Whereas in the single-threaded case, I would be able to do:
and know that my handlers would trap all the conditions, if Maybe I'm just trying to use conditions for something they shouldn't be used for, though. |
This is an interesting point. I do think that this is how conditions
Conditions in the parent would be in scope for the latter two, but |
This sort of relates to how RWArc variables can be poisoned by write actions failing, or how Java's FutureTasks can be poisoned. Maybe if there was some-way to register the condition before failure, and then reinvoke the task if appropriate? So far, I'm thinking of something along the lines of |
@catamorphism This fix is actually updating the conditions tutorial? or after reading the reactions, there are some issues regarding how conditions and tasks interact. Let me know in which direction this issue is going |
part of #11755 |
Delete issue because conditions are removed? |
Indeed, thanks @pongad! |
Fix false positive for `never_loop` struct expression fields Fixes rust-lang#9001. changelog: [`never_loop`]: Now checks for `continue` in struct expression
If task A spawns task B, and B has an unhandled condition, that manifests as task B failing -- any handlers in A won't get invoked. This was pretty sensible once I thought about it, but it surprised me at first. I think the conditions tutorial should mention it.
The text was updated successfully, but these errors were encountered: