]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/threadengines/threadengine_win32.h
Remove the unused ThreadEngine::GetName() method from both implementations
[user/henk/code/inspircd.git] / include / threadengines / threadengine_win32.h
index 9ca180cef7592c0698b29be2b33184a57a3d75c6..45be0ff06077a58877cf59cdd1058f681d499469 100644 (file)
  */
 
 
-#ifndef THREADENGINE_WIN32_H
-#define THREADENGINE_WIN32_H
+#pragma once
 
-#include "inspircd_config.h"
+#include "config.h"
 #include "base.h"
 
 class Thread;
@@ -53,14 +52,6 @@ class CoreExport ThreadEngine
          * 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
@@ -108,12 +99,15 @@ class ThreadQueueData
  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);
        }
 
@@ -149,6 +143,3 @@ class ThreadSignalData
                connFD = -1;
        }
 };
-
-#endif
-