File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ struct Inner {
165
165
/// The number of notified entries, or `usize::MAX` if all of them have been notified.
166
166
///
167
167
/// If there are no entries, this value is set to `usize::MAX`.
168
- pub ( crate ) notified : AtomicUsize ,
168
+ notified : AtomicUsize ,
169
169
170
170
/// Inner queue of event listeners.
171
171
list : list:: List ,
@@ -179,14 +179,6 @@ impl Inner {
179
179
list : list:: List :: new ( ) ,
180
180
}
181
181
}
182
-
183
- /// Locks the list.
184
- pub ( crate ) fn lock ( & self ) -> Option < list:: ListGuard < ' _ > > {
185
- self . list . inner . try_lock ( ) . map ( |guard| list:: ListGuard {
186
- inner : self ,
187
- guard : Some ( guard) ,
188
- } )
189
- }
190
182
}
191
183
192
184
/// A synchronization primitive for notifying async tasks and threads.
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ use core::ops;
14
14
use slab:: Slab ;
15
15
16
16
impl crate :: Inner {
17
+ /// Locks the list.
18
+ fn lock ( & self ) -> Option < ListGuard < ' _ > > {
19
+ self . list . inner . try_lock ( ) . map ( |guard| ListGuard {
20
+ inner : self ,
21
+ guard : Some ( guard) ,
22
+ } )
23
+ }
24
+
17
25
/// Add a new listener to the list.
18
26
///
19
27
/// Does nothing if the list is already registered.
You can’t perform that action at this time.
0 commit comments