Reduce AtomicTask spurious notifications (#227)

This commit is contained in:
Carl Lerche 2018-03-13 13:28:41 -07:00 committed by GitHub
parent 8eb3e58b7d
commit 5846b3fc2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}
}