Skip to content

Commit

Permalink
Retrigger CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mamaicode committed Oct 12, 2023
1 parent 82f1d8d commit 4a110cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ impl Event<()> {
inner: AtomicPtr::new(ptr::null_mut()),
}
}

/// Notifies a number of active listeners without emitting a `SeqCst` fence.
///
/// The number is allowed to be zero or exceed the current number of listeners.
Expand Down
7 changes: 6 additions & 1 deletion src/no_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,12 @@ impl<T> List<T> {
}
}
pub fn total_listeners(&self) -> usize {
self.inner.try_lock().len()
self.inner
.try_lock()
.as_ref()
.map(|lock| &**lock)
.map(|listener_slab| listener_slab.listeners.len())
.unwrap_or(0)
}
}

Expand Down

0 comments on commit 4a110cd

Please sign in to comment.