BLPAPI C++
3.24.2
|
#include <blpapi_eventdispatcher.h>
Public Member Functions | |
EventDispatcher (size_t numDispatcherThreads=1) | |
~EventDispatcher () | |
int | start () |
int | stop (bool async=false) |
blpapi_EventDispatcher_t * | impl () const |
Dispatches events from one or more Sessions through callbacks
EventDispatcher objects are optionally specified when Session objects are constructed. A single EventDispatcher can be shared by multiple Session objects.
The EventDispatcher provides an event-driven interface, generating callbacks from one or more internal threads for one or more sessions.
|
explicit |
Construct an EventDispatcher with the specified numDispatcherThreads
. If numDispatcherThreads
is 1 (the default) then a single internal thread is created to dispatch events. If numDispatcherThreads
is greater than 1 then an internal pool of numDispatcherThreads
threads is created to dispatch events. The behavior is undefined if numDispatcherThreads
is 0.
~EventDispatcher | ( | ) |
Destructor.
blpapi_EventDispatcher_t * impl | ( | ) | const |
Returns the internal implementation.
int start | ( | ) |
Start generating callbacks for events from sessions associated with this EventDispatcher. Return 0 on success and a non zero value otherwise.
int stop | ( | bool | async = false | ) |
Shutdown this event dispatcher object and stop generating callbacks for events from sessions associated with it. If the specified async
is false (the default) then this method blocks until all current callbacks which were dispatched through this EventDispatcher have completed. Return 0 on success and a non zero value otherwise.
Note: Calling stop with async
of false from within a callback dispatched by this EventDispatcher is undefined and may result in a deadlock.