mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 11:40:29 +02:00
Prevent occasional crash in external tool threads with Sleep(1), especially with LazBuild. Issue #37883.
git-svn-id: branches/fixes_2_0@64023 -
This commit is contained in:
parent
8ddcd102ee
commit
5d06959c36
@ -1229,11 +1229,13 @@ end;
|
||||
|
||||
procedure TAbstractExternalTool.EnterCriticalSection;
|
||||
begin
|
||||
Sleep(1); // Force context switch to prevent occasional crash. Issue #36318, #37883 etc.
|
||||
FWorkerMessages.EnterCriticalSection;
|
||||
end;
|
||||
|
||||
procedure TAbstractExternalTool.LeaveCriticalSection;
|
||||
begin
|
||||
Sleep(1);
|
||||
FWorkerMessages.LeaveCriticalSection;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user