mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::ctx: view::wait_until() needs to throw on timeout.
This commit is contained in:
parent
26b33a1845
commit
807f3c4545
1 changed files with 4 additions and 2 deletions
|
@ -130,7 +130,8 @@ ircd::ctx::view<T, mutex>::wait_until(lock &l,
|
|||
for(assert(l.owns_lock()); ready(); l.lock())
|
||||
{
|
||||
l.unlock();
|
||||
q.wait_until(tp);
|
||||
if(!q.wait_until(tp))
|
||||
throw timeout{};
|
||||
}
|
||||
|
||||
const unwind ul{[this]
|
||||
|
@ -142,7 +143,8 @@ ircd::ctx::view<T, mutex>::wait_until(lock &l,
|
|||
for(++waiting; !ready(); l.lock())
|
||||
{
|
||||
l.unlock();
|
||||
q.wait_until(tp);
|
||||
if(!q.wait_until(tp))
|
||||
throw timeout{};
|
||||
}
|
||||
|
||||
assert(t != nullptr);
|
||||
|
|
Loading…
Reference in a new issue