-
Notifications
You must be signed in to change notification settings - Fork 581
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
Timeout: use less resources, clean them up better and make cancellation deterministic #10254
base: master
Are you sure you want to change the base?
Conversation
144abb1
to
394b2fb
Compare
It's not used. Also, the callback shall run completely at once. This ensures that it won't (continue to) run once another coroutine on the strand calls Timeout#Cancel().
394b2fb
to
0845bbe
Compare
0845bbe
to
3d3c644
Compare
3d3c644
to
77edc65
Compare
77edc65
to
2f96403
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some documentation to the class. It now has some non-obvious details, especially regarding what happens at destruction (see #10254 (comment)).
2f96403
to
af4cceb
Compare
983307f
to
9074d78
Compare
cb3068f
to
ba63964
Compare
ba63964
to
01f2f7e
Compare
…meout&&), Timeout#operator=(const Timeout&), Timeout#operator=(Timeout&&)
Co-authored-by: ChatGPT <[email protected]>
01f2f7e
to
bfb0303
Compare
The requested changes were addressed, so far I didn't get around to do a full review though.
@yhabteab Please could you have yet another look? After all
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve the conflicts! And please drop the Co-Authored-By:
entry from bfb0303, that's just so unnecessary!
👍 Now we got unit tests!!! ❤️ 144abb1
👍 Now the destructor leads to cancellation. 21fc946
👍 Now the callback is "atomic", i.e. it doesn't yield. 32e64b6 175099c This way cancellation can't happen in a callback yield, making sure once cancelled, the callback won't (continue to) run. Also, we don't need any coroutine which has to carry around shared pointers which prevent own destruction...
closes #10250
closes #10252