mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +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())
|
for(assert(l.owns_lock()); ready(); l.lock())
|
||||||
{
|
{
|
||||||
l.unlock();
|
l.unlock();
|
||||||
q.wait_until(tp);
|
if(!q.wait_until(tp))
|
||||||
|
throw timeout{};
|
||||||
}
|
}
|
||||||
|
|
||||||
const unwind ul{[this]
|
const unwind ul{[this]
|
||||||
|
@ -142,7 +143,8 @@ ircd::ctx::view<T, mutex>::wait_until(lock &l,
|
||||||
for(++waiting; !ready(); l.lock())
|
for(++waiting; !ready(); l.lock())
|
||||||
{
|
{
|
||||||
l.unlock();
|
l.unlock();
|
||||||
q.wait_until(tp);
|
if(!q.wait_until(tp))
|
||||||
|
throw timeout{};
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(t != nullptr);
|
assert(t != nullptr);
|
||||||
|
|
Loading…
Reference in a new issue