mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
Reduce AtomicTask spurious notifications (#227)
This commit is contained in:
parent
8eb3e58b7d
commit
5846b3fc2a
@ -155,7 +155,7 @@ impl AtomicTask {
|
||||
if actual == curr {
|
||||
// Notify the task
|
||||
unsafe {
|
||||
if let Some(ref task) = *self.task.get() {
|
||||
if let Some(ref task) = (*self.task.get()).take() {
|
||||
task.notify();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user