Future<T> helper record
This commit is contained in:
@@ -41,13 +41,6 @@ type
|
||||
// will be re-raised in the calling (main) thread.
|
||||
procedure Teardown;
|
||||
|
||||
// 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);
|
||||
|
||||
// Gets the number of worker threads.
|
||||
property ThreadCount: Integer read GetThreadCount;
|
||||
end;
|
||||
@@ -89,6 +82,7 @@ type
|
||||
function InMainThread: Boolean;
|
||||
function InWorkerThread: Boolean;
|
||||
|
||||
// Initialize global TaskManager
|
||||
class procedure AquireTaskManager;
|
||||
class procedure ReleaseTaskManager;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user