*/
-#ifndef THREADENGINE_WIN32_H
-#define THREADENGINE_WIN32_H
+#pragma once
-#include "inspircd_config.h"
+#include "config.h"
#include "base.h"
class Thread;
* derived object.
*/
void Start(Thread* thread_to_init);
-
- /** Returns the thread engine's name for display purposes
- * @return The thread engine name
- */
- const std::string GetName()
- {
- return "windows-thread";
- }
};
class CoreExport ThreadData
public:
ThreadQueueData()
{
- InitializeCriticalSection(&mutex);
event = CreateEvent(NULL, false, false, NULL);
+ if (event == NULL)
+ throw CoreException("CreateEvent() failed in ThreadQueueData::ThreadQueueData()!");
+ InitializeCriticalSection(&mutex);
}
~ThreadQueueData()
{
+ CloseHandle(event);
DeleteCriticalSection(&mutex);
}
connFD = -1;
}
};
-
-#endif
-