Future<T> helper record

This commit is contained in:
Michael Schimmel
2025-06-02 14:27:00 +02:00
parent 48f4c945ce
commit e7e26f2a12
8 changed files with 1269 additions and 322 deletions
+7
View File
@@ -9,6 +9,13 @@ uses
type
IMycTaskManager = interface
function CreateTask( const Gate: IMycState; const Proc: TProc ): TMycSubscription;
// Waits for the operation associated with State to complete.
// Must not be called from a worker thread of this factory.
// After waiting, or if the state is already set, any first stored exception
// from any worker thread of this factory will be re-raised in the calling (main) thread.
// Raises ETaskException if called from within a worker thread.
procedure WaitFor(State: IMycState);
end;
var