Skip to content

Commit 5c59974

Browse files
committed
add comment
1 parent 7acb869 commit 5c59974

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/asyncio/gather.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ GatherAwaiterRepositry(Futs&&...) -> GatherAwaiterRepositry<Futs...>;
100100

101101
template<concepts::Awaitable... Futs>
102102
auto gather(NoWaitAtInitialSuspend, Futs&&... futs) // need NoWaitAtInitialSuspend to lift futures lifetime early
103-
-> Task<std::tuple<GetTypeIfVoid_t<AwaitResult<Futs>>...>> {
103+
-> Task<std::tuple<GetTypeIfVoid_t<AwaitResult<Futs>>...>> { // lift awaitable type(GatherAwaiterRepositry) to coroutine
104104
co_return co_await detail::GatherAwaiterRepositry{ std::forward<Futs>(futs)... };
105105
}
106106
}

include/asyncio/wait_for.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ WaitForAwaiterRegistry(Fut&& fut, Duration duration)
100100

101101
template<concepts::Awaitable Fut, typename Rep, typename Period>
102102
auto wait_for(NoWaitAtInitialSuspend, Fut&& fut, std::chrono::duration<Rep, Period> timeout)
103-
-> Task<AwaitResult<Fut>> {
103+
-> Task<AwaitResult<Fut>> { // lift awaitable type(WaitForAwaiterRegistry) to coroutine
104104
co_return co_await WaitForAwaiterRegistry { std::forward<Fut>(fut), timeout };
105105
}
106106
}

0 commit comments

Comments
 (0)