@@ -797,10 +797,9 @@ pub fn park() {
797
797
match thread. inner . state . compare_exchange ( EMPTY , PARKED , SeqCst , SeqCst ) {
798
798
Ok ( _) => { }
799
799
Err ( NOTIFIED ) => {
800
- // should consume this notification, so prohibit spurious wakeups in next park...
801
- thread. inner . state . store ( EMPTY , SeqCst ) ;
802
- return ;
803
- } , // notified after we locked
800
+ thread. inner . state . store ( EMPTY , SeqCst ) ;
801
+ return ;
802
+ } // should consume this notification, so prohibit spurious wakeups in next park.
804
803
Err ( _) => panic ! ( "inconsistent park state" ) ,
805
804
}
806
805
loop {
@@ -887,10 +886,9 @@ pub fn park_timeout(dur: Duration) {
887
886
match thread. inner . state . compare_exchange ( EMPTY , PARKED , SeqCst , SeqCst ) {
888
887
Ok ( _) => { }
889
888
Err ( NOTIFIED ) => {
890
- // should consume this notification, so prohibit spurious wakeups in next park...
891
- thread. inner . state . store ( EMPTY , SeqCst ) ;
892
- return ;
893
- } , // notified after we locked
889
+ thread. inner . state . store ( EMPTY , SeqCst ) ;
890
+ return ;
891
+ } // should consume this notification, so prohibit spurious wakeups in next park.
894
892
Err ( _) => panic ! ( "inconsistent park_timeout state" ) ,
895
893
}
896
894
0 commit comments