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

sync: use intrusive list strategy for broadcast #2509

Merged
merged 12 commits into from
May 12, 2020
4 changes: 0 additions & 4 deletions tokio/src/loom/std/atomic_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ impl<T> AtomicPtr<T> {
let inner = std::sync::atomic::AtomicPtr::new(ptr);
AtomicPtr { inner }
}

pub(crate) fn with_mut<R>(&mut self, f: impl FnOnce(&mut *mut T) -> R) -> R {
f(self.inner.get_mut())
}
}

impl<T> Deref for AtomicPtr<T> {
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/sync/batch_semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl Semaphore {

/// Release `rem` permits to the semaphore's wait list, starting from the
/// end of the queue.
///
///
/// If `rem` exceeds the number of permits needed by the wait list, the
/// remainder are assigned back to the semaphore.
fn add_permits_locked(&self, mut rem: usize, waiters: MutexGuard<'_, Waitlist>) {
Expand Down
Loading