mirror of
https://github.com/boostorg/cobalt.git
synced 2026-01-19 04:02:16 +00:00
19 lines
371 B
Plaintext
19 lines
371 B
Plaintext
[#tour-join]
|
|
== join
|
|
|
|
If multiple <<awaitable, awaitables>> work in parallel they can be awaited simultaneously with
|
|
<<join, join>>.
|
|
|
|
[source,cpp]
|
|
----
|
|
cobalt::promise<int> some_work();
|
|
cobalt::promise<double> more_work();
|
|
|
|
cobalt::main co_main(int argc, char * argv[])
|
|
{
|
|
std::tuple<int, double> res = cobalt::join(some_work(), more_work());
|
|
co_return 0;
|
|
}
|
|
----
|
|
|