Implemented TLazy + Tests
This commit is contained in:
@@ -150,7 +150,7 @@ begin
|
||||
FWorkThreads[i].Free;
|
||||
|
||||
if Assigned(FException) then
|
||||
FException.Free;
|
||||
FException.Free;
|
||||
|
||||
FWorkGate.Free;
|
||||
FWorkStack.Clear;
|
||||
@@ -203,7 +203,7 @@ var
|
||||
capturedProc: TProc;
|
||||
begin
|
||||
// Create a latch that will be signaled when the proc finishes
|
||||
res := TMycLatch.CreateLatch(1); // Changed to use direct static call on TMycLatch
|
||||
res := TLatch.Construct(1); // Changed to use direct static call on TMycLatch
|
||||
|
||||
capturedProc := Proc; // Capture Proc for the anonymous method
|
||||
CreateAnonymousThread('Thread',
|
||||
@@ -303,7 +303,7 @@ begin
|
||||
raise ETaskException.Create('Task factory terminated');
|
||||
|
||||
if not Assigned(Job) then
|
||||
exit(TMycLatch.Null); // Already correct, uses direct static property on TMycLatch
|
||||
exit(TLatch.Null); // Already correct, uses direct static property on TMycLatch
|
||||
|
||||
// Create a pending job
|
||||
Result := TMycPendingJob.Create(Self, Job);
|
||||
|
||||
Reference in New Issue
Block a user