-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Avoid pinning notified future #3098
Merged
carllerche
merged 11 commits into
tokio-rs:master
from
zaharidichev:zd/avoid-pinning-notified-future
Nov 16, 2020
Merged
Avoid pinning notified future #3098
carllerche
merged 11 commits into
tokio-rs:master
from
zaharidichev:zd/avoid-pinning-notified-future
Nov 16, 2020
Commits on Nov 5, 2020
-
sync: avoid pinning notified future
This PR changes the way `notify_waiters`, is used. Previously in order for the consumer to register interest, in a notification triggered by `notify_waiters`, the `Notified` future had to be polled. This introduced friction when using the api as the future had to be pinned before polled. This change introduces a counter that tracks how many times `notified_waiters` has been called. Upon creation of the future the number of times is loaded. When first polled the future compares this number with the count state of the `Notify` type. This avoids the need for registering the waiter upfront. Fixes: tokio-rs#3066 Signed-off-by: Zahari Dichev <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb17708 - Browse repository at this point
Copy the full SHA bb17708View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d1e606 - Browse repository at this point
Copy the full SHA 4d1e606View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc59a9b - Browse repository at this point
Copy the full SHA dc59a9bView commit details
Commits on Nov 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for af54dfc - Browse repository at this point
Copy the full SHA af54dfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for acf6c12 - Browse repository at this point
Copy the full SHA acf6c12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8683a6d - Browse repository at this point
Copy the full SHA 8683a6dView commit details -
Signed-off-by: Zahari Dichev <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3d31e98 - Browse repository at this point
Copy the full SHA 3d31e98View commit details
Commits on Nov 13, 2020
-
Signed-off-by: Zahari Dichev <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e76755f - Browse repository at this point
Copy the full SHA e76755fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ddf422 - Browse repository at this point
Copy the full SHA 0ddf422View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa937f8 - Browse repository at this point
Copy the full SHA fa937f8View commit details
Commits on Nov 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8f3d853 - Browse repository at this point
Copy the full SHA 8f3d853View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.