proxygen
folly::coro::Baton::WaitOperation Class Reference

#include <Baton.h>

Public Member Functions

 WaitOperation (const Baton &baton) noexcept
 
bool await_ready () const noexcept
 
bool await_suspend (std::experimental::coroutine_handle<> awaitingCoroutine) noexcept
 
void await_resume () noexcept
 

Protected Attributes

const Batonbaton_
 
std::experimental::coroutine_handle awaitingCoroutine_
 
WaitOperationnext_
 

Friends

class Baton
 

Detailed Description

Definition at line 97 of file Baton.h.

Constructor & Destructor Documentation

folly::coro::Baton::WaitOperation::WaitOperation ( const Baton baton)
inlineexplicitnoexcept

Definition at line 99 of file Baton.h.

99 : baton_(baton) {}

Member Function Documentation

bool folly::coro::Baton::WaitOperation::await_ready ( ) const
inlinenoexcept

Definition at line 101 of file Baton.h.

References baton_, and folly::coro::Baton::ready().

101  {
102  return baton_.ready();
103  }
bool ready() const noexcept
Query whether the Baton is currently in the signalled state.
Definition: Baton.h:135
void folly::coro::Baton::WaitOperation::await_resume ( )
inlinenoexcept

Definition at line 111 of file Baton.h.

111 {}
bool folly::coro::Baton::WaitOperation::await_suspend ( std::experimental::coroutine_handle<>  awaitingCoroutine)
inlinenoexcept

Definition at line 105 of file Baton.h.

References awaitingCoroutine_, baton_, and folly::coro::Baton::waitImpl().

106  {
107  awaitingCoroutine_ = awaitingCoroutine;
108  return baton_.waitImpl(this);
109  }
bool waitImpl(WaitOperation *awaiter) const noexcept
std::experimental::coroutine_handle awaitingCoroutine_
Definition: Baton.h:117

Friends And Related Function Documentation

friend class Baton
friend

Definition at line 114 of file Baton.h.

Member Data Documentation

std::experimental::coroutine_handle folly::coro::Baton::WaitOperation::awaitingCoroutine_
protected

Definition at line 117 of file Baton.h.

Referenced by await_suspend().

const Baton& folly::coro::Baton::WaitOperation::baton_
protected

Definition at line 116 of file Baton.h.

Referenced by await_ready(), and await_suspend().

WaitOperation* folly::coro::Baton::WaitOperation::next_
protected

Definition at line 118 of file Baton.h.


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