Commit d10938a0 authored by Kenton Varda's avatar Kenton Varda

Fix -Werror build.

parent efb38296
...@@ -367,13 +367,13 @@ struct Executor::Impl { ...@@ -367,13 +367,13 @@ struct Executor::Impl {
cancel.forEach([&](_::XThreadEvent& event) { cancel.forEach([&](_::XThreadEvent& event) {
cancel.erase(event); cancel.erase(event);
KJ_IF_MAYBE(n, event.promiseNode) { if (event.promiseNode == nullptr) {
event.state = _::XThreadEvent::DONE;
} else {
// We can't destroy the promiseNode while the mutex is locked, because we don't know // We can't destroy the promiseNode while the mutex is locked, because we don't know
// what the destructor might do. But, we *must* destroy it before acknowledging // what the destructor might do. But, we *must* destroy it before acknowledging
// cancellation. So we have to add it to a list to destroy later. // cancellation. So we have to add it to a list to destroy later.
eventsToCancelOutsideLock.add(&event); eventsToCancelOutsideLock.add(&event);
} else {
event.state = _::XThreadEvent::DONE;
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment