mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd::ctx: Fix future wait condition closing.
This commit is contained in:
parent
51e3d7f081
commit
3301ed62f7
1 changed files with 3 additions and 11 deletions
|
@ -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
|
||||
return state.cond.wait_until(tp, [&state]
|
||||
{
|
||||
[&state]
|
||||
{
|
||||
return !is(state, future_state::PENDING);
|
||||
}
|
||||
};
|
||||
|
||||
if(unlikely(!state.cond.wait_until(tp, wfun)))
|
||||
return false;
|
||||
|
||||
return wfun();
|
||||
return !is(state, future_state::PENDING);
|
||||
});
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
|
Loading…
Reference in a new issue