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

Avoid pinning notified future #3098

Merged

Commits on Nov 5, 2020

  1. 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]>
    zaharidichev committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    bb17708 View commit details
    Browse the repository at this point in the history
  2. fix comment

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    4d1e606 View commit details
    Browse the repository at this point in the history
  3. fix visibility

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    dc59a9b View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2020

  1. add loom test

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 6, 2020
    Configuration menu
    Copy the full SHA
    af54dfc View commit details
    Browse the repository at this point in the history
  2. one more waiter

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 6, 2020
    Configuration menu
    Copy the full SHA
    acf6c12 View commit details
    Browse the repository at this point in the history
  3. add docs

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 6, 2020
    Configuration menu
    Copy the full SHA
    8683a6d View commit details
    Browse the repository at this point in the history
  4. add missing imports

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 6, 2020
    Configuration menu
    Copy the full SHA
    3d31e98 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2020

  1. wake outside of lock

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    e76755f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0ddf422 View commit details
    Browse the repository at this point in the history
  3. fmt

    carllerche committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    fa937f8 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2020

  1. feedback

    Signed-off-by: Zahari Dichev <[email protected]>
    zaharidichev committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    8f3d853 View commit details
    Browse the repository at this point in the history