0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 04:38:52 +02:00

ircd::ctx: Fix future wait condition closing.

This commit is contained in:
Jason Volk 2019-07-19 14:45:36 -07:00
parent 51e3d7f081
commit 3301ed62f7

View file

@ -351,18 +351,10 @@ ircd::ctx::_wait_until(const future<T> &f,
if(unlikely(is(state, future_state::INVALID)))
throw no_state{};
const auto wfun
{
[&state]
return state.cond.wait_until(tp, [&state]
{
return !is(state, future_state::PENDING);
}
};
if(unlikely(!state.cond.wait_until(tp, wfun)))
return false;
return wfun();
});
}
template<class T>