Skip to content

What's the recommended way to wait a list of senders? #1631

@lixin-wei

Description

@lixin-wei

e.g. I have a vector of senders.

int n = <some runtime-known number>;

std::vector<MySender> senders;
for (int i = 0; i < n; ++i) {
  senders.push_back(...);
}

How to execute them in parallel and get all results? when_all doesn't work because all input senders of when_all should be known at compile-time. I can't pass a vector to when_all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions