File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,18 @@ use core::pin::Pin;
3030use core:: task:: { Context , Poll } ;
3131
3232/// Used to signal to one of many waiters that the condition they're waiting on has happened.
33- pub ( crate ) struct Notifier {
33+ pub struct Notifier {
3434 notify_pending : Mutex < ( bool , Option < Arc < Mutex < FutureState > > > ) > ,
3535}
3636
3737impl Notifier {
38- pub ( crate ) fn new ( ) -> Self {
38+ /// Constructs a new notifier.
39+ pub fn new ( ) -> Self {
3940 Self { notify_pending : Mutex :: new ( ( false , None ) ) }
4041 }
4142
4243 /// Wake waiters, tracking that wake needs to occur even if there are currently no waiters.
43- pub ( crate ) fn notify ( & self ) {
44+ pub fn notify ( & self ) {
4445 let mut lock = self . notify_pending . lock ( ) . unwrap ( ) ;
4546 if let Some ( future_state) = & lock. 1 {
4647 if complete_future ( future_state) {
@@ -52,7 +53,7 @@ impl Notifier {
5253 }
5354
5455 /// Gets a [`Future`] that will get woken up with any waiters
55- pub ( crate ) fn get_future ( & self ) -> Future {
56+ pub fn get_future ( & self ) -> Future {
5657 let mut lock = self . notify_pending . lock ( ) . unwrap ( ) ;
5758 let mut self_idx = 0 ;
5859 if let Some ( existing_state) = & lock. 1 {
You can’t perform that action at this time.
0 commit comments