Share via


SysAutoSemaphore::autoSemaphore Method [AX 2012]

Creates a SysAutoSemaphore instance with the provided semaphore name.

Syntax

client server public static SysAutoSemaphore autoSemaphore(SemaphoreName _semaphoreName)

Run On

Called

Parameters

Return Value

Type: SysAutoSemaphore Class
A SysAutoSemaphore instance. The resource will be released when the instance gets out of scope in the interpreter or the SysAutoSemaphore.finalize method is called.

Exceptions

Exception Condition
Error

The first caller has not released the resource.

Remarks

Only one instance can live at a time in the system. Subsequent callers will receive an exception until the first caller releases the resource.

See Also

Reference

SysAutoSemaphore Class