AuraTrader Sample

This commit is contained in:
Michael Schimmel
2025-06-17 21:49:09 +02:00
parent f81337c98d
commit a9aff8c41a
13 changed files with 2093 additions and 306 deletions
+8
View File
@@ -49,6 +49,8 @@ type
class property Null: IFuture read FNull;
procedure Manage;
function Chain<S>(const Proc: TFunc<T, S>): TFuture<S>; overload;
function Chain<S>(const Proc: TFuncConst<T, S>): TFuture<S>; overload;
function WaitFor: T;
@@ -113,6 +115,12 @@ begin
Result := FFuture.Value;
end;
procedure TFuture<T>.Manage;
begin
if GetTypeKind(T) = tkClass then
FFuture := TMycFutureManaged<T>.Create(FFuture);
end;
function TFuture<T>.WaitFor: T;
begin
TaskManager.WaitFor(FFuture.Done);