mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 18:18:32 +02:00
* ffinish patch
git-svn-id: trunk@2141 -
This commit is contained in:
parent
9bb86eb411
commit
1318b959e0
@ -205,7 +205,8 @@ end;
|
||||
|
||||
destructor TThread.Destroy;
|
||||
begin
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then
|
||||
if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate)
|
||||
and not fFinished then
|
||||
raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
|
||||
|
||||
// if someone calls .Free on a thread with
|
||||
|
Loading…
Reference in New Issue
Block a user