diff --git a/include/ircd/ctx/shared_state.h b/include/ircd/ctx/shared_state.h index c97a7d76f..0cdcdabbb 100644 --- a/include/ircd/ctx/shared_state.h +++ b/include/ircd/ctx/shared_state.h @@ -90,16 +90,22 @@ template void ircd::ctx::notify(shared_state &st) { - st.cond.notify_all(); - if(!st.then) + { + st.cond.notify_all(); return; + } if(!current) - return st.then(st); + { + st.cond.notify_all(); + st.then(st); + return; + } ircd::post([&st] { + st.cond.notify_all(); st.then(st); }); }