21 auto output = std::make_shared<Channel<T>> ();
26 while (
auto value =
co_await *inChan)
27 outChan->Send (std::move (*value));
30 } (output, std::move (channels));
40 !std::is_same_v<T, void>,
42 typename ArgType_t<F, 0>::element_type::ItemType_t
47 auto output = std::make_shared<Channel<ItemType>> ();
50 co_await std::invoke (f, output, args...);
52 } (std::forward<F> (f), output, std::forward<Args> (args)...);
58 typename Conv = std::identity,
60 typename ItemType = RetType_t<F>::ResultType_t,
61 typename ConvertedType = std::invoke_result_t<Conv, ItemType>
65 auto output = std::make_shared<Channel<ConvertedType>> ();
68 auto res =
co_await std::invoke (f, args...);
69 output->Send (conv (std::move (res)));
71 } (std::forward<F> (f), std::forward<Conv> (conv), output, std::forward<Args> (args)...);
std::shared_ptr< Channel< T > > Channel_ptr
Channel_ptr< ItemType > WithChannel(F &&f, Args &&... args)
Task< QVector< T >, Exts... > InParallel(Cont< Task< T, Exts... > > tasks)
Channel_ptr< T > MergeChannels(QVector< Channel_ptr< T > > channels)
Channel_ptr< ConvertedType > ChannelFromSingleResult(F &&f, Conv &&conv, Args &&... args)