Implementing first "strategy" for proof of concept

This commit is contained in:
Michael Schimmel
2025-07-11 11:06:18 +02:00
parent 644b6074d6
commit 487169afe0
20 changed files with 1761 additions and 274 deletions
+2 -3
View File
@@ -213,7 +213,7 @@ begin
// if not FOwnerFixture.FNotifier.IsFinalized then // Don't notify if finalized
begin
FOwnerFixture.FNotifier.Notify(
function(Item: IMyStressTestInterface): Boolean
function(const Item: IMyStressTestInterface): Boolean
begin
Item.Foo(FThreadID); // Pass ThreadID as notification type for context
Result := True; // Keep item
@@ -255,7 +255,6 @@ end;
procedure TMycNotifierChaosStressTests.Setup;
begin
Randomize; // Initialize random number generator
FNotifier.Create;
FAllReceiversCreated := TList<IMyStressTestInterface>.Create;
FCriticalSectionForList := TCriticalSection.Create;
FNextReceiverInstanceID := 0;
@@ -359,7 +358,7 @@ begin
// if not FNotifier.IsFinalized then
begin
FNotifier.Notify(
function(Item: IMyStressTestInterface): Boolean
function(const Item: IMyStressTestInterface): Boolean
begin
actualLiveReceiversInNotifier.Add(Item);
Result := True;