Refactoring TFuture
This commit is contained in:
@@ -138,6 +138,8 @@ begin
|
||||
end;
|
||||
for var i := 0 to High(FWorkThreads) do
|
||||
FWorkThreads[i].Start;
|
||||
|
||||
FWaitSemaphores.Push( TSemaphore.Create(nil, 0, 1, '') );
|
||||
end;
|
||||
|
||||
destructor TMycTaskFactory.Destroy;
|
||||
@@ -147,6 +149,9 @@ begin
|
||||
for var i := High(FWorkThreads) downto 0 do
|
||||
FWorkThreads[i].Free;
|
||||
|
||||
if Assigned(FException) then
|
||||
FException.Free;
|
||||
|
||||
FWorkGate.Free;
|
||||
FWorkStack.Clear;
|
||||
inherited Destroy;
|
||||
|
||||
Reference in New Issue
Block a user