29 #ifndef AsyncComm_ReactorFactory_h
30 #define AsyncComm_ReactorFactory_h
34 #include <boost/thread/thread.hpp>
65 static void initialize(uint16_t reactor_count);
105 static std::default_random_engine
rng;
131 #endif // AsyncComm_ReactorFactory_h
static void get_reactor(ReactorPtr &reactor, Reactor::Priority priority=Reactor::Priority::NORMAL)
This method returns the 'next' reactor.
static bool verbose
Verbose mode.
static void initialize(uint16_t reactor_count)
Initializes I/O reactors.
static bool ms_epollet
Use "edge triggered" epoll.
static std::vector< ReactorPtr > ms_reactors
Vector of reactors (last position is timer reactor)
static std::default_random_engine rng
Pseudo random number generator.
Static class used to setup and manage I/O reactors.
static std::atomic< int > ms_next_reactor
Atomic integer used for round-robin assignment of reactors.
static boost::thread_group ms_threads
Boost thread_group for managing reactor threads.
static void destroy()
This method shuts down the reactors.
static void join()
Joins with reactor threads.
std::shared_ptr< Reactor > ReactorPtr
Shared smart pointer to Reactor.
Declarations for Reactor.
Priority
Enumeration for reactor priority.
static std::mutex ms_mutex
Mutex to serialize calls to initialize.
static bool proxy_master
Set to true if this process is acting as "Proxy Master".
static void get_timer_reactor(ReactorPtr &reactor)
This method returns the timer reactor.