proxygen
QueueConsumer Class Reference
Inheritance diagram for QueueConsumer:
folly::NotificationQueue< MessageT >::Consumer folly::DelayedDestruction folly::EventHandler folly::DelayedDestructionBase

Public Member Functions

 QueueConsumer ()
 
void messageAvailable (int &&value) noexceptoverride
 
- Public Member Functions inherited from folly::NotificationQueue< MessageT >::Consumer
 Consumer ()
 
virtual void messageAvailable (MessageT &&message) noexcept=0
 
void startConsuming (EventBase *eventBase, NotificationQueue *queue)
 
void startConsumingInternal (EventBase *eventBase, NotificationQueue *queue)
 
void stopConsuming ()
 
bool consumeUntilDrained (size_t *numConsumed=nullptr) noexcept
 
NotificationQueuegetCurrentQueue () const
 
void setMaxReadAtOnce (uint32_t maxAtOnce)
 
uint32_t getMaxReadAtOnce () const
 
EventBasegetEventBase ()
 
void handlerReady (uint16_t events) noexceptoverride
 
template<typename TCallback >
std::unique_ptr< typename NotificationQueue< MessageT >::Consumer, DelayedDestruction::Destructormake (TCallback &&callback)
 
- Public Member Functions inherited from folly::DelayedDestruction
bool getDestroyPending () const
 
- Public Member Functions inherited from folly::DelayedDestructionBase
virtual ~DelayedDestructionBase ()=default
 

Public Attributes

std::function< void(int)> fn
 
std::deque< int > messages
 

Additional Inherited Members

- Public Types inherited from folly::NotificationQueue< MessageT >::Consumer
enum  : uint16_t { kDefaultMaxReadAtOnce = 10 }
 
- Static Public Member Functions inherited from folly::NotificationQueue< MessageT >::Consumer
template<typename TCallback >
static std::unique_ptr< Consumer, DelayedDestruction::Destructormake (TCallback &&callback)
 
- Protected Member Functions inherited from folly::NotificationQueue< MessageT >::Consumer
void destroy () override
 
 ~Consumer () override
 
- Protected Member Functions inherited from folly::DelayedDestruction
 ~DelayedDestruction () override=default
 
 DelayedDestruction ()
 
- Protected Member Functions inherited from folly::DelayedDestructionBase
 DelayedDestructionBase ()
 
uint32_t getDestructorGuardCount () const
 

Detailed Description

Definition at line 38 of file NotificationQueueTest.cpp.

Constructor & Destructor Documentation

QueueConsumer::QueueConsumer ( )
inline

Definition at line 40 of file NotificationQueueTest.cpp.

40 {}

Member Function Documentation

void QueueConsumer::messageAvailable ( int &&  value)
inlineoverridenoexcept

Definition at line 42 of file NotificationQueueTest.cpp.

References messages, and value.

42  {
43  messages.push_back(value);
44  if (fn) {
45  fn(value);
46  }
47  }
std::function< void(int)> fn
std::deque< int > messages
static const char *const value
Definition: Conv.cpp:50

Member Data Documentation

std::function<void(int)> QueueConsumer::fn
std::deque<int> QueueConsumer::messages

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