folly::EventBaseManager

Manager for per-thread EventBase objects. This class will find or create a EventBase for the current thread, associated with thread-specific storage for that thread. Although a typical application will generally only have one EventBaseManager, there is no restriction on multiple instances; the EventBases belong to one instance are isolated from those of another.

Synopsis

Declared in <folly/io/async/EventBaseManager.h>

class EventBaseManager;

Member Functions

NameDescription
EventBaseManager [constructor]Constructors
~EventBaseManager [destructor]Destroys the manager.
clearEventBase Clear the EventBase for this thread.
getEventBase Get the EventBase for this thread, or create one if none exists yet.
getExistingEventBase Get the EventBase for this thread.
setEventBase Set the EventBase to be used by this thread.

Static Member Functions

NameDescription
get Get the global EventBaseManager for this program. Ideally all users of EventBaseManager go through this interface and do not construct EventBaseManager directly.