-
Notifications
You must be signed in to change notification settings - Fork 30
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
add method total_listeners() when feature std #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation should be modified with less guarantees as to the effectiveness of this function. For instance, the documentation should mention all of the following:
- This is just a snapshot of the number of listeners at this point in time. It is possible for the actual number to change at any point.
- The number should only ever be used as a hint.
@notgull could you review it again? |
@@ -54,6 +54,14 @@ impl<T> List<T> { | |||
Err(_) => Err("<locked>"), | |||
} | |||
} | |||
|
|||
// Get the listener count by blocking | |||
pub(crate) fn total_listeners_wait(&self) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name this function total_listeners
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
total_listeners
is already defined just above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Mirror of #114 Signed-off-by: John Nunley <dev@notgull.net>
Mirror of #114 Signed-off-by: John Nunley <dev@notgull.net>
Mirror of #114 Signed-off-by: John Nunley <dev@notgull.net>
#106