Răsfoiți Sursa

* don't detach thread when finished, but pthread_exit it
(so it can be joined)

git-svn-id: trunk@184 -

Jonas Maebe 20 ani în urmă
părinte
comite
f1a2ef1db2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      rtl/unix/cthreads.pp

+ 1 - 1
rtl/unix/cthreads.pp

@@ -192,7 +192,7 @@ Type  PINTRTLEvent = ^TINTRTLEvent;
 {$endif DEBUG_MT}
         ThreadMain:=pointer(ti.f(ti.p));
         DoneThread;
-        pthread_detach(pthread_t(pthread_self()));
+        pthread_exit(nil);
       end;