mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +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 {
|
if actual == curr {
|
||||||
// Notify the task
|
// Notify the task
|
||||||
unsafe {
|
unsafe {
|
||||||
if let Some(ref task) = *self.task.get() {
|
if let Some(ref task) = (*self.task.get()).take() {
|
||||||
task.notify();
|
task.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user