Table of Contents

TTMSMCPTask.WaitForTerminal Method

Blocks the calling thread until the task reaches a final state or the timeout elapses.

API unit family: TMS.MCP.Tasks Declaring type: TTMSMCPTask

Syntax

function WaitForTerminal(ATimeoutMs: Cardinal): Boolean;

Remarks

Used to answer a request for the result, which waits for the outcome instead of replying with a non-final snapshot. Mark the task through TTMSMCPTaskRegistry.MarkTaskInUse around a long wait so that it cannot be purged while the wait is in progress.

Parameters

Name Description
ATimeoutMs Longest time to wait, in milliseconds.

Returns

True when the task finished within the timeout; False when the wait timed out and the operation is still running.