New tests for atomic ops

This commit is contained in:
Michael Schimmel
2025-06-03 19:49:48 +02:00
parent 556690fa5e
commit f438c91dbd
11 changed files with 511 additions and 951 deletions
+2 -1
View File
@@ -212,6 +212,7 @@ function TMycLatch.Subscribe(Subscriber: IMycSubscriber): Pointer;
var
alreadySet: Boolean;
begin
Result := nil;
if not Assigned(Subscriber) then
exit;
@@ -332,7 +333,7 @@ end;
function TMycDirty.Subscribe(Subscriber: IMycSubscriber): Pointer;
begin
if not Assigned(Subscriber) then
exit;
exit(nil);
// For TMycDirty, we always add the subscriber and then check if we need to notify immediately.
// Ref counting for the subscriber interface is assumed to be handled by TMycNotifyList.Advise/Unadvise.