From 5846b3fc2ae0a6a90e0cb1b017833dd2a22c31b5 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 13 Mar 2018 13:28:41 -0700 Subject: [PATCH] Reduce AtomicTask spurious notifications (#227) --- tokio-reactor/src/atomic_task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-reactor/src/atomic_task.rs b/tokio-reactor/src/atomic_task.rs index 1510eee26..9b4ba00ca 100644 --- a/tokio-reactor/src/atomic_task.rs +++ b/tokio-reactor/src/atomic_task.rs @@ -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(); } }