TaskManager refactoring
This commit is contained in:
@@ -27,7 +27,7 @@ type
|
||||
[IgnoreMemoryLeaks(true)]
|
||||
TTestMycGateFuncFuture = class(TObject)
|
||||
private
|
||||
FTaskFactory: IMycThreadPool;
|
||||
FTaskFactory: IThreadPool;
|
||||
FProcExecutionCount: Integer; // Counter for side effects of AProc
|
||||
FSharedCounter: Integer; // For Fan-Out test side effects
|
||||
public
|
||||
@@ -156,7 +156,7 @@ end;
|
||||
procedure TTestMycGateFuncFuture.Test_ExceptionInProc_HandledAsPlanned;
|
||||
var
|
||||
LFuture: TFuture<Integer>.IFuture;
|
||||
LLocalTaskFactory: IMycThreadPool;
|
||||
LLocalTaskFactory: IThreadPool;
|
||||
LInitStateAsState: TState.IState;
|
||||
LResultValue: Integer;
|
||||
LExpectedExceptionRaisedByFactory: Boolean;
|
||||
@@ -288,7 +288,7 @@ begin
|
||||
end
|
||||
);
|
||||
LSub1 := TLatchNotifierSubscriber.Create(LGateLatch);
|
||||
Subscriptions[1] := LPrerequisiteFuture1.Done.Subscribe(LSub1); // Subscribe to PF1's completion [cite: 56, 188, 306]
|
||||
Subscriptions[1] := LPrerequisiteFuture1.Done.Signal.Subscribe(LSub1); // Subscribe to PF1's completion [cite: 56, 188, 306]
|
||||
|
||||
// PrerequisiteFuture2
|
||||
LInitStateP2 := TLatch.CreateLatch(1); // Controllable init state for PF2
|
||||
@@ -303,7 +303,7 @@ begin
|
||||
end
|
||||
);
|
||||
LSub2 := TLatchNotifierSubscriber.Create(LGateLatch);
|
||||
Subscriptions[2] := LPrerequisiteFuture2.Done.Subscribe(LSub2); // Subscribe to PF2's completion
|
||||
Subscriptions[2] := LPrerequisiteFuture2.Done.Signal.Subscribe(LSub2); // Subscribe to PF2's completion
|
||||
|
||||
// --- Execution & Verification ---
|
||||
Assert.IsFalse(LMainFuture.Done.IsSet, 'MainFuture should not be done yet.');
|
||||
|
||||
Reference in New Issue
Block a user