0
0
Fork 0
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:
Jason Volk 2018-03-26 16:53:24 -07:00
parent 26b33a1845
commit 807f3c4545

View file

@ -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);