Refactoring
This commit is contained in:
@@ -76,7 +76,7 @@ type
|
||||
procedure HandleException;
|
||||
procedure EnqueueJob(const Job: TProc);
|
||||
function Run(Job: TProc): IMycSubscriber;
|
||||
function CreateTask(const Gate: IMycState; const Proc: TProc): TMycSubscription;
|
||||
function CreateTask(const Gate: TState; const Proc: TProc): TState.TSubscription;
|
||||
procedure WaitFor(State: IMycState);
|
||||
procedure Teardown;
|
||||
function InMainThread: Boolean;
|
||||
@@ -183,10 +183,9 @@ begin
|
||||
Result.NameThreadForDebugging(DbgName); // Set thread name for debugging
|
||||
end;
|
||||
|
||||
function TMycTaskFactory.CreateTask(const Gate: IMycState; const Proc: TProc):
|
||||
TMycSubscription;
|
||||
function TMycTaskFactory.CreateTask(const Gate: TState; const Proc: TProc): TState.TSubscription;
|
||||
begin
|
||||
if not Assigned(Gate) or Gate.IsSet then
|
||||
if Gate.IsSet then
|
||||
begin
|
||||
EnqueueJob( Proc );
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user