mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
- disabled fix for mantis 6693 from r5662 since the fix itself also
contains a race condition git-svn-id: trunk@5670 -
This commit is contained in:
parent
11daaa31f2
commit
1867a46f34
@ -82,11 +82,11 @@ begin
|
|||||||
// free ourselves before TThread.Create has finished
|
// free ourselves before TThread.Create has finished
|
||||||
// (since that one may check our VTM in case of $R+, and
|
// (since that one may check our VTM in case of $R+, and
|
||||||
// will call the AfterConstruction method in all cases)
|
// will call the AfterConstruction method in all cases)
|
||||||
LThread.Suspend;
|
// LThread.Suspend;
|
||||||
WRITE_DEBUG('AfterConstruction should have been called for ',ptrint(lthread));
|
WRITE_DEBUG('AfterConstruction should have been called for ',ptrint(lthread));
|
||||||
if LThread.FInitialSuspended then
|
if LThread.FInitialSuspended then
|
||||||
begin
|
begin
|
||||||
LThread.Suspend;
|
CurrentTM.SemaphoreWait(LThread.FSem);
|
||||||
if not(LThread.FTerminated) then
|
if not(LThread.FTerminated) then
|
||||||
begin
|
begin
|
||||||
if not LThread.FSuspended then
|
if not LThread.FSuspended then
|
||||||
@ -142,7 +142,7 @@ begin
|
|||||||
FSem := CurrentTM.SemaphoreInit();
|
FSem := CurrentTM.SemaphoreInit();
|
||||||
if FSem = nil then
|
if FSem = nil then
|
||||||
raise EThread.create('Semaphore init failed (possibly too many concurrent threads)');
|
raise EThread.create('Semaphore init failed (possibly too many concurrent threads)');
|
||||||
FSuspended := False;
|
FSuspended := CreateSuspended;
|
||||||
FSuspendedExternal := false;
|
FSuspendedExternal := false;
|
||||||
FInitialSuspended := CreateSuspended;
|
FInitialSuspended := CreateSuspended;
|
||||||
FFatalException := nil;
|
FFatalException := nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user