Skip to main content
Table of Contents

TTMSMCPTaskRegistry.SetTaskResult Method

Stores the outcome of a registered task, marks it completed and wakes the callers waiting for it to finish.

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

Syntax

TMS.MCP.Tasks.hppPascalC++
procedure SetTaskResult(const ATaskId: string; AResult: TJSONValue);
void __fastcall SetTaskResult(const System::UnicodeString ATaskId, System::Json::TJSONValue* AResult);

Remarks

There is no need to set the state separately. When the task has already finished the value is released instead of stored, so the first outcome wins. When the identifier is unknown nothing happens and the value is left untouched, which leaves the caller responsible for releasing it.

Parameters

Name Description
ATaskId Identifier of the task to complete.
AResult Value produced by the operation. The task takes ownership of it.