]> git.mxchange.org Git - simgear.git/blobdiff - simgear/threads/SGThread.cxx
Tweak HTTP code to always sleep.
[simgear.git] / simgear / threads / SGThread.cxx
index b4afc65198ed83ffbbfe4a2a65e35ab086cbac15..0ba71f408fc47485409d15d13c383d9e42f5a2df 100644 (file)
@@ -71,7 +71,7 @@ struct SGThread::PrivateData {
     {
         if (_handle == INVALID_HANDLE_VALUE)
             return;
-        DWORD ret = WaitForSingleObject(_handle, 0);
+        DWORD ret = WaitForSingleObject(_handle, INFINITE);
         if (ret != WAIT_OBJECT_0)
             return;
         CloseHandle(_handle);
@@ -81,6 +81,10 @@ struct SGThread::PrivateData {
     HANDLE _handle;
 };
 
+long SGThread::current( void ) {
+    return (long)GetCurrentThreadId();
+}
+
 struct SGMutex::PrivateData {
     PrivateData()
     {
@@ -227,6 +231,10 @@ struct SGThread::PrivateData {
     bool _started;
 };
 
+long SGThread::current( void ) {
+    return (long)pthread_self();
+}
+
 struct SGMutex::PrivateData {
     PrivateData()
     {