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

broadcast: Stop notifying after we've woken all wakers #5925

Merged
merged 1 commit into from
Aug 14, 2023
Merged

broadcast: Stop notifying after we've woken all wakers #5925

merged 1 commit into from
Aug 14, 2023

Commits on Aug 13, 2023

  1. broadcast: Move waiters into separate list before waking

    Within `notify_rx`, looping while re-locking and re-reading from
    `Shared.tail` as long as there are still available wakers causes a
    quadratic slowdown as receivers which are looping receiving from the
    channel are added. Instead of continually re-reading from the original
    list, this commit modifies `notify_rx` to move the waiters into a
    separate list immediately similar to how `Notify::notify_waiters` works,
    using a new `WaitersList` struct modified after NotifyWaitersList.
    
    Fixes #5923
    glittershark committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    3146c0f View commit details
    Browse the repository at this point in the history