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 @@ -31,19 +31,20 @@ use core::pin::Pin;
3131
3232
3333/// Used to signal to one of many waiters that the condition they're waiting on has happened.
34- pub ( crate ) struct Notifier {
34+ pub struct Notifier {
3535 notify_pending : Mutex < ( bool , Option < Arc < Mutex < FutureState > > > ) > ,
3636}
3737
3838impl Notifier {
39- pub ( crate ) fn new ( ) -> Self {
39+ /// Constructs a new notifier.
40+ pub fn new ( ) -> Self {
4041 Self {
4142 notify_pending : Mutex :: new ( ( false , None ) ) ,
4243 }
4344 }
4445
4546 /// Wake waiters, tracking that wake needs to occur even if there are currently no waiters.
46- pub ( crate ) fn notify ( & self ) {
47+ pub fn notify ( & self ) {
4748 let mut lock = self . notify_pending . lock ( ) . unwrap ( ) ;
4849 if let Some ( future_state) = & lock. 1 {
4950 if complete_future ( future_state) {
@@ -55,7 +56,7 @@ impl Notifier {
5556 }
5657
5758 /// Gets a [`Future`] that will get woken up with any waiters
58- pub ( crate ) fn get_future ( & self ) -> Future {
59+ pub fn get_future ( & self ) -> Future {
5960 let mut lock = self . notify_pending . lock ( ) . unwrap ( ) ;
6061 let mut self_idx = 0 ;
6162 if let Some ( existing_state) = & lock. 1 {
You can’t perform that action at this time.
0 commit comments