Table of Contents

TTMSMCPResources.Lock Property

Guards this collection's own registration and removal methods (Add, AddResource, RegisterDirectResource, RegisterTemplateResource, UnregisterResource) against a concurrent read of the collection, for example while resources/list is being served on another thread.

API unit family: TMS.MCP.Resources Declaring type: TTMSMCPResources Type: TCriticalSection

Syntax

property Lock: TCriticalSection;

Remarks

Acquire this lock before calling Free directly on a resource obtained from FindByURI or FindMatchingTemplate instead of going through UnregisterResource; freeing an item that way is not otherwise synchronized with a concurrent read.