diff options
author | Juan Alvarez <j@yabit.io> | 2020-09-07 13:56:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-07 20:56:15 +0200 |
commit | 38ec4845d14c25b9d89cb6fbdf2a5c5472971fc3 (patch) | |
tree | 906c5aadb8f39072aed6db614ea95f6830e1d864 /tokio/src/sync/tests/loom_notify.rs | |
parent | 842d5565bdd4310cd96386a8ffa9949b24c5856f (diff) |
sync: rename `Notify::notify()` -> `notify_one()` (#2822)
Closes: #2813
Diffstat (limited to 'tokio/src/sync/tests/loom_notify.rs')
-rw-r--r-- | tokio/src/sync/tests/loom_notify.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tokio/src/sync/tests/loom_notify.rs b/tokio/src/sync/tests/loom_notify.rs index 60981d46..79a5bf89 100644 --- a/tokio/src/sync/tests/loom_notify.rs +++ b/tokio/src/sync/tests/loom_notify.rs @@ -16,7 +16,7 @@ fn notify_one() { }); }); - tx.notify(); + tx.notify_one(); th.join().unwrap(); }); } @@ -34,12 +34,12 @@ fn notify_multi() { ths.push(thread::spawn(move || { block_on(async { notify.notified().await; - notify.notify(); + notify.notify_one(); }) })); } - notify.notify(); + notify.notify_one(); for th in ths.drain(..) { th.join().unwrap(); @@ -67,7 +67,7 @@ fn notify_drop() { block_on(poll_fn(|cx| { if recv.as_mut().poll(cx).is_ready() { - rx1.notify(); + rx1.notify_one(); } Poll::Ready(()) })); @@ -77,12 +77,12 @@ fn notify_drop() { block_on(async { rx2.notified().await; // Trigger second notification - rx2.notify(); + rx2.notify_one(); rx2.notified().await; }); }); - notify.notify(); + notify.notify_one(); th1.join().unwrap(); th2.join().unwrap(); |