Create backlog sockets on demand

This commit is contained in:
Ruihan Li
2024-12-02 23:11:43 +08:00
committed by Tate, Hongliang Tian
parent a739848464
commit 776fd6a892
24 changed files with 947 additions and 781 deletions

View File

@ -138,9 +138,22 @@ impl<T: ?Sized> KeyableArc<T> {
}
/// Creates a new `KeyableWeak` pointer to this allocation.
#[inline]
pub fn downgrade(this: &Self) -> KeyableWeak<T> {
Arc::downgrade(&this.0).into()
}
/// Gets the number of strong pointers pointing to this allocation.
#[inline]
pub fn strong_count(this: &Self) -> usize {
Arc::strong_count(&this.0)
}
/// Gets the number of weak pointers pointing to this allocation.
#[inline]
pub fn weak_count(this: &Self) -> usize {
Arc::weak_count(&this.0)
}
}
impl<T: ?Sized> Deref for KeyableArc<T> {