RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
Datacratic::PeriodicEventSource Struct Reference

#include <async_event_source.h>

Inheritance diagram for Datacratic::PeriodicEventSource:
Datacratic::AsyncEventSource

List of all members.

Public Member Functions

 PeriodicEventSource (double timePeriodSeconds, std::function< void(uint64_t)> onTimeout, bool singleThreaded=true)
void init (double timePeriodSeconds, std::function< void(uint64_t)> onTimeout, bool singleThreaded=true)
virtual int selectFd () const
virtual bool processOne ()
virtual bool singleThreaded () const

Detailed Description

An async event source that can deal with multiple events.

Definition at line 117 of file async_event_source.h.


Member Function Documentation

Process a single message and return true if there are more to be processed.

This may be called from more than one thread if singleThreaded() is false.

Implements Datacratic::AsyncEventSource.

Definition at line 120 of file async_event_source.cc.

Return the file descriptor on which one should select() for messages from this source. The source should organize itself such that if the fd indicates ready for a read, there is something to do.

Should return -1 if it requires polling.

Should never block.

Reimplemented from Datacratic::AsyncEventSource.

Definition at line 113 of file async_event_source.cc.

virtual bool Datacratic::PeriodicEventSource::singleThreaded ( ) const [inline, virtual]

Return whether the callbacks need to be called from a single thread or not.

Reimplemented from Datacratic::AsyncEventSource.

Definition at line 134 of file async_event_source.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator