Download Now

    Reference IAsyncTask

    Declared in Codebot.System.pas on line 1206

    IAsyncTask is used to perform cancellable tasks in background threads. When a task is created its initial status is busy and the start time is recorded.
      IAsyncTask = interface
      public
        { Cancel marks the task as cancelled }
        procedure Cancel;
        { Waits for the task to complete }
        procedure Wait;
        { Cancelled is true if cancel has been invoked at least one time }
        property Cancelled: Boolean read GetCancelled;
        { Data can be set to be owned by the task }
        property Data: TObject read GetData;
        { Progress is a number indicating the amount of work done }
        property Progress: Int64 read GetProgress;
        { Start time is a record of when the task began }
        property StartTime: TDateTime read GetStartTime;
        { Duration is a record of time in seconds the task lasted }
        property Duration: Double read GetDuration;
        { Status of the task }
        property Status: TAsyncStatus read GetStatus;
      end;

    See also