mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 16:04:15 +01:00
ircd::ctx: Fix bitrot in when_all() template.
This commit is contained in:
parent
fff36e0d42
commit
c3062e80f1
1 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@ ircd::ctx::when_all(it first,
|
|||
promise<void> p;
|
||||
const auto set_then
|
||||
{
|
||||
[&p](auto &f)
|
||||
[&p](it &f)
|
||||
{
|
||||
f.st.then = [p]
|
||||
f->state().then = [p]
|
||||
(shared_state_base &) mutable
|
||||
{
|
||||
then(p);
|
||||
|
@ -55,7 +55,7 @@ ircd::ctx::when_all(it first,
|
|||
future<void> ret(p);
|
||||
for(; first != last; ++first)
|
||||
if(is(first->state(), future_state::PENDING))
|
||||
set_then(*first);
|
||||
set_then(first);
|
||||
|
||||
if(refcount(p.state()) <= 1)
|
||||
p.set_value();
|
||||
|
|
Loading…
Reference in a new issue