mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 10:00:31 +02:00
* applied r2098 change regarding threads destroying themselves to
the other bsd variants git-svn-id: trunk@2158 -
This commit is contained in:
parent
43af4ed0b3
commit
f92f8501ff
@ -200,7 +200,7 @@ end;
|
||||
|
||||
destructor TThread.Destroy;
|
||||
begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) and not ffinished then begin
|
||||
raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
|
||||
end;
|
||||
// if someone calls .Free on a thread with
|
||||
|
@ -196,7 +196,7 @@ end;
|
||||
|
||||
destructor TThread.Destroy;
|
||||
begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) and not ffinished then begin
|
||||
raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
|
||||
end;
|
||||
// if someone calls .Free on a thread with
|
||||
|
@ -205,7 +205,7 @@ end;
|
||||
|
||||
destructor TThread.Destroy;
|
||||
begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) and not ffinished then begin
|
||||
raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
|
||||
end;
|
||||
// if someone calls .Free on a thread with
|
||||
|
Loading…
Reference in New Issue
Block a user