cppcoro
cppcoro copied to clipboard
schedule_on demotes shared_task to task
As the following example demonstrates, cppcoro::shared_task
s become cppcoro::task
s when propagating through cppcoro::schedule_on
. Is this intended behaviour?
auto f() -> cppcoro::shared_task<int>
{
co_return 0;
}
auto tp = cppcoro::static_thread_pool{};
auto g = cppcoro::schedule_on(tp, f()); // g is a cppcoro::task<int&>
https://godbolt.org/z/e3oKBG