Skip to main content
Table of Contents

TTMSMCPTaskRegistry.PurgeExpiredTasks Method

Removes and releases every task whose lifetime has elapsed.

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

Syntax

TMS.MCP.Tasks.hppPascalC++
procedure PurgeExpiredTasks;
void __fastcall PurgeExpiredTasks();

Remarks

A task expires once more than its lifetime has passed since it was created, whatever its state; a lifetime of zero or less never expires. Tasks that are currently marked as in use are skipped, so a caller blocked on a result is never left holding a released task. Call this periodically, for example from the server's housekeeping timer.