Skip to content

Commit

Permalink
scupt-net
Browse files Browse the repository at this point in the history
ybbh committed Dec 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent cb8c9e0 commit ce4d547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/notifier.rs
Original file line number Diff line number Diff line change
@@ -120,14 +120,14 @@ impl NotifyInner {

// Keep invoking notify_waiters until the num_waiting is 0.
async fn repeat_notify_until_no_waiting(&self) {
while self.num_waiting.load(SeqCst) == 0 {
while self.num_waiting.load(SeqCst) != 0 {
sleep(Duration::from_millis(10)).await;
self.stop_notifier.notify_waiters();
}
}

fn repeat_notify(&self) {
while self.num_waiting.load(SeqCst) == 0 {
while self.num_waiting.load(SeqCst) != 0 {
thread::sleep(Duration::from_millis(10));
self.stop_notifier.notify_waiters();
}

0 comments on commit ce4d547

Please sign in to comment.