]> git.saurik.com Git - wxWidgets.git/commitdiff
fix incoherency between the wxThread implementation based on MSW threads and pthread...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Wed, 26 May 2010 22:44:13 +0000 (22:44 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Wed, 26 May 2010 22:44:13 +0000 (22:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/threadpsx.cpp

index 4583b6b8680818a990a22256566f8116cfdf0602..95d8586f91379b1b1a00f6c98f90d5dae0d8ebeb 100644 (file)
@@ -1476,6 +1476,11 @@ wxThreadError wxThread::Delete(ExitCode *rc)
             }
             //else: can't wait for detached threads
     }
+    
+    if (state == STATE_NEW)
+        return wxTHREAD_MISC_ERROR;
+            // for coherency with the MSW implementation, signal the user that 
+            // Delete() was called on a thread which didn't start to run yet.
 
     return wxTHREAD_NO_ERROR;
 }