mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6664 from Icinga/bugfix/daemonize-socketeventengine-threads
Revert "Initialize Socket Event Engine on application startup"
This commit is contained in:
commit
1c880addd8
|
@ -35,8 +35,6 @@ static SocketEventEngine *l_SocketIOEngine;
|
|||
|
||||
int SocketEvents::m_NextID = 0;
|
||||
|
||||
INITIALIZE_ONCE(&SocketEvents::InitializeEngine);
|
||||
|
||||
void SocketEventEngine::Start()
|
||||
{
|
||||
for (int tid = 0; tid < SOCKET_IOTHREADS; tid++) {
|
||||
|
@ -116,6 +114,8 @@ void SocketEvents::InitializeEngine()
|
|||
SocketEvents::SocketEvents(const Socket::Ptr& socket, Object *lifesupportObject)
|
||||
: m_ID(m_NextID++), m_FD(socket->GetFD()), m_EnginePrivate(nullptr)
|
||||
{
|
||||
boost::call_once(l_SocketIOOnceFlag, &SocketEvents::InitializeEngine);
|
||||
|
||||
Register(lifesupportObject);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ public:
|
|||
void *GetEnginePrivate() const;
|
||||
void SetEnginePrivate(void *priv);
|
||||
|
||||
static void InitializeEngine();
|
||||
|
||||
protected:
|
||||
SocketEvents(const Socket::Ptr& socket, Object *lifesupportObject);
|
||||
|
||||
|
@ -66,6 +64,8 @@ private:
|
|||
|
||||
static int m_NextID;
|
||||
|
||||
static void InitializeEngine();
|
||||
|
||||
void WakeUpThread(bool wait = false);
|
||||
|
||||
void Register(Object *lifesupportObject);
|
||||
|
|
Loading…
Reference in New Issue