proxygen
folly::coro::detail Namespace Reference

Classes

struct  _has_free_operator_co_await
 
struct  _has_member_operator_co_await
 
struct  _is_coroutine_handle
 
struct  _is_coroutine_handle< std::experimental::coroutine_handle< T > >
 
struct  _is_valid_await_suspend_return_type
 
class  BlockingWaitPromise
 
class  BlockingWaitPromise< T & >
 
class  BlockingWaitPromise< void >
 
class  BlockingWaitPromiseBase
 
class  BlockingWaitTask
 
struct  decay_rvalue_reference
 
struct  decay_rvalue_reference< T && >
 
class  InlineTask
 
class  InlineTaskPromise
 
class  InlineTaskPromise< void >
 
class  InlineTaskPromiseBase
 
class  TaskPromise
 
class  TaskPromise< void >
 
class  TaskPromiseBase
 
class  ViaCoroutine
 
struct  void_t< decltype(operator co_await(std::declval< Awaitable >()))>
 
struct  void_t< decltype(std::declval< Awaitable >().operator co_await())>
 

Typedefs

template<typename T >
using decay_rvalue_reference_t = typename decay_rvalue_reference< T >::type
 

Functions

template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t<!std::is_lvalue_reference< Result >::value, int > = 0>
auto makeBlockingWaitTask (Awaitable &&awaitable) -> BlockingWaitTask< decay_rvalue_reference_t< Result >>
 
template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t< std::is_void< Result >::value, int > = 0>
BlockingWaitTask< void > makeRefBlockingWaitTask (Awaitable &&awaitable)
 
template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t<!std::is_void< Result >::value, int > = 0>
auto makeRefBlockingWaitTask (Awaitable &&awaitable) -> BlockingWaitTask< std::add_lvalue_reference_t< Result >>
 

Typedef Documentation

template<typename T >
using folly::coro::detail::decay_rvalue_reference_t = typedef typename decay_rvalue_reference<T>::type

Definition at line 260 of file BlockingWait.h.

Function Documentation

template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t<!std::is_lvalue_reference< Result >::value, int > = 0>
auto folly::coro::detail::makeBlockingWaitTask ( Awaitable &&  awaitable) -> BlockingWaitTask<decay_rvalue_reference_t<Result>>

Definition at line 266 of file BlockingWait.h.

References value.

267  {
268  co_return co_await static_cast<Awaitable&&>(awaitable);
269 }
template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t< std::is_void< Result >::value, int > = 0>
BlockingWaitTask<void> folly::coro::detail::makeRefBlockingWaitTask ( Awaitable &&  awaitable)

Definition at line 284 of file BlockingWait.h.

References value.

Referenced by folly::coro::blockingWait().

284  {
285  co_await static_cast<Awaitable&&>(awaitable);
286 }
template<typename Awaitable , typename Result = await_result_t<Awaitable>, std::enable_if_t<!std::is_void< Result >::value, int > = 0>
auto folly::coro::detail::makeRefBlockingWaitTask ( Awaitable &&  awaitable) -> BlockingWaitTask<std::add_lvalue_reference_t<Result>>

Definition at line 292 of file BlockingWait.h.

293  {
294  co_yield co_await static_cast<Awaitable&&>(awaitable);
295 }