Test Refactoring of signals

This commit is contained in:
Michael Schimmel
2025-06-05 22:11:54 +02:00
parent c9817ca200
commit e06a023742
17 changed files with 528 additions and 774 deletions
+3 -3
View File
@@ -203,11 +203,11 @@ end;
function TMycTaskFactory.CreateThread(const Proc: TProc): IMycState;
var
res: IMycLatch;
res: IMycEvent;
capturedProc: TProc;
begin
// Create a latch that will be signaled when the proc finishes
res := TLatch.Construct(1); // Changed to use direct static call on TMycLatch
res := TEvent.CreateLatch(1);
capturedProc := Proc; // Capture Proc for the anonymous method
CreateAnonymousThread(
@@ -309,7 +309,7 @@ begin
raise ETaskException.Create('Task factory terminated');
if not Assigned(Job) then
exit(TLatch.Null); // Already correct, uses direct static property on TMycLatch
exit(TEvent.Null); // Already correct, uses direct static property on TMycLatch
// Create a pending job
Result := TMycPendingJob.Create(Self, Job);