|
@@ -184,6 +184,9 @@ begin
|
|
Resume;
|
|
Resume;
|
|
end;
|
|
end;
|
|
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('TThread.SysDestroy: waiting on thread');{$ENDIF}
|
|
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('TThread.SysDestroy: waiting on thread');{$ENDIF}
|
|
|
|
+ // Before calling WaitFor, signal main thread with WakeMainThread, so pending checksynchronize calls are handled.
|
|
|
|
+ if assigned(WakeMainThread) then
|
|
|
|
+ WakeMainThread(Self);
|
|
WaitFor;
|
|
WaitFor;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|