New tests for atomic ops
This commit is contained in:
@@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Classes, System.SyncObjs,
|
||||
Myc.Core.Atomic, Myc.TaskManager, Myc.Signals; // Myc.Signals now requires direct use of TMycLatch static members
|
||||
Myc.Core.Atomic, Myc.TaskManager, Myc.Signals;
|
||||
|
||||
type
|
||||
IMycTaskFactory = interface( IMycTaskManager )
|
||||
@@ -85,13 +85,13 @@ type
|
||||
// Initialize global TaskManager
|
||||
class procedure AquireTaskManager;
|
||||
class procedure ReleaseTaskManager;
|
||||
|
||||
property ThreadsRunning: Integer read FThreadsRunning;
|
||||
property WorkThreads: TArray<TThread> read FWorkThreads;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Myc.Core.Signals;
|
||||
|
||||
type
|
||||
TMycPendingJob = class(TInterfacedObject, IMycSubscriber)
|
||||
private
|
||||
@@ -357,7 +357,7 @@ begin
|
||||
if lock = nil then
|
||||
lock := TSemaphore.Create(nil, 0, 1, '');
|
||||
try
|
||||
var subscription := State.Subscribe(TMycTaskWait.Create(lock));
|
||||
{var subscription :=} State.Subscribe(TMycTaskWait.Create(lock));
|
||||
lock.Acquire;
|
||||
finally
|
||||
FWaitSemaphores.Push(lock);
|
||||
|
||||
Reference in New Issue
Block a user