- 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:
Jonas Maebe 2006-12-21 23:11:35 +00:00
parent 11daaa31f2
commit 1867a46f34

View File

@ -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;