proxygen
folly::coro::ViaIfAsyncAwaiter< Awaiter > Class Template Reference

#include <ViaIfAsync.h>

Public Member Functions

template<typename Awaitable >
 ViaIfAsyncAwaiter (folly::InlineExecutor *, Awaitable &&awaitable)
 
template<typename Awaitable >
 ViaIfAsyncAwaiter (folly::Executor *executor, Awaitable &&awaitable)
 
bool await_ready () noexcept(noexcept(std::declval< Awaiter & >().await_ready()))
 
auto await_suspend (std::experimental::coroutine_handle<> continuation) noexcept(noexcept(std::declval< Awaiter & >().await_suspend(continuation)))
 
decltype(auto) await_resume () noexcept(noexcept(std::declval< Awaiter & >().await_resume()))
 

Public Attributes

detail::ViaCoroutine viaCoroutine_
 
Awaiter awaiter_
 

Detailed Description

template<typename Awaiter>
class folly::coro::ViaIfAsyncAwaiter< Awaiter >

Definition at line 137 of file ViaIfAsync.h.

Constructor & Destructor Documentation

template<typename Awaiter >
template<typename Awaitable >
folly::coro::ViaIfAsyncAwaiter< Awaiter >::ViaIfAsyncAwaiter ( folly::InlineExecutor ,
Awaitable &&  awaitable 
)
inlineexplicit

Definition at line 144 of file ViaIfAsync.h.

146  awaiter_(
147  folly::coro::get_awaiter(static_cast<Awaitable&&>(awaitable))) {}
static ViaCoroutine createInline() noexcept
Definition: ViaIfAsync.h:120
detail::ViaCoroutine viaCoroutine_
Definition: ViaIfAsync.h:173
Awaitable & get_awaiter(Awaitable &&awaitable)
Definition: Traits.h:138
template<typename Awaiter >
template<typename Awaitable >
folly::coro::ViaIfAsyncAwaiter< Awaiter >::ViaIfAsyncAwaiter ( folly::Executor executor,
Awaitable &&  awaitable 
)
inlineexplicit

Definition at line 150 of file ViaIfAsync.h.

152  awaiter_(
153  folly::coro::get_awaiter(static_cast<Awaitable&&>(awaitable))) {}
static ViaCoroutine create(folly::Executor *executor)
Definition: ViaIfAsync.h:116
detail::ViaCoroutine viaCoroutine_
Definition: ViaIfAsync.h:173
Awaitable & get_awaiter(Awaitable &&awaitable)
Definition: Traits.h:138

Member Function Documentation

template<typename Awaiter >
bool folly::coro::ViaIfAsyncAwaiter< Awaiter >::await_ready ( )
inlinenoexcept

Definition at line 155 of file ViaIfAsync.h.

156  {
157  return awaiter_.await_ready();
158  }
template<typename Awaiter >
decltype(auto) folly::coro::ViaIfAsyncAwaiter< Awaiter >::await_resume ( )
inlinenoexcept

Definition at line 167 of file ViaIfAsync.h.

168  {
170  return awaiter_.await_resume();
171  }
detail::ViaCoroutine viaCoroutine_
Definition: ViaIfAsync.h:173
template<typename Awaiter >
auto folly::coro::ViaIfAsyncAwaiter< Awaiter >::await_suspend ( std::experimental::coroutine_handle<>  continuation)
inlinenoexcept

Definition at line 161 of file ViaIfAsync.h.

162  {
163  return awaiter_.await_suspend(
164  viaCoroutine_.getWrappedCoroutine(continuation));
165  }
std::experimental::coroutine_handle getWrappedCoroutine(std::experimental::coroutine_handle<> continuation) noexcept
Definition: ViaIfAsync.h:100
detail::ViaCoroutine viaCoroutine_
Definition: ViaIfAsync.h:173

Member Data Documentation

template<typename Awaiter >
Awaiter folly::coro::ViaIfAsyncAwaiter< Awaiter >::awaiter_

Definition at line 174 of file ViaIfAsync.h.

template<typename Awaiter >
detail::ViaCoroutine folly::coro::ViaIfAsyncAwaiter< Awaiter >::viaCoroutine_

Definition at line 173 of file ViaIfAsync.h.


The documentation for this class was generated from the following file: