Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
broadcast: Stop notifying after we've woken all wakers
Unboundedly looping within `notify_rx` 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 waiting for new wakers, this commit modifies `notify_rx` to stop trying to wake wakers once we've notified a number of wakers greater than or equal to whatever the number of active wakers was when we started notifying. Fixes #5923
- Loading branch information