浏览代码

* Call EndThread manually if thread function returns (mantis #11490)

git-svn-id: trunk@11671 -
michael 17 年之前
父节点
当前提交
c179162028
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      rtl/unix/cthreads.pp

+ 1 - 2
rtl/unix/cthreads.pp

@@ -242,8 +242,7 @@ Type  PINTRTLEvent = ^TINTRTLEvent;
         writeln('Jumping to thread function');
 {$endif DEBUG_MT}
         ThreadMain:=pointer(ti.f(ti.p));
-        DoneThread;
-        pthread_exit(ThreadMain);
+        EndThread(0);
       end;