mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 08:24:08 +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;
|
promise<void> p;
|
||||||
const auto set_then
|
const auto set_then
|
||||||
{
|
{
|
||||||
[&p](auto &f)
|
[&p](it &f)
|
||||||
{
|
{
|
||||||
f.st.then = [p]
|
f->state().then = [p]
|
||||||
(shared_state_base &) mutable
|
(shared_state_base &) mutable
|
||||||
{
|
{
|
||||||
then(p);
|
then(p);
|
||||||
|
@ -55,7 +55,7 @@ ircd::ctx::when_all(it first,
|
||||||
future<void> ret(p);
|
future<void> ret(p);
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
if(is(first->state(), future_state::PENDING))
|
if(is(first->state(), future_state::PENDING))
|
||||||
set_then(*first);
|
set_then(first);
|
||||||
|
|
||||||
if(refcount(p.state()) <= 1)
|
if(refcount(p.state()) <= 1)
|
||||||
p.set_value();
|
p.set_value();
|
||||||
|
|
Loading…
Reference in a new issue