SK_PLUS_NetworkSemaphoreDispose Function

Disposes of a network semaphore, unlocking and deleting the semaphore file.

Remarks

This function is automatically called by SK_PLUS_NetworkSemaphoreOpen to clear any previously opened semaphore on the given context. This is also automatically called by SK_ApiContextDispose to clear any opened semaphore on the context which is being disposed, which prevents memory leaks and helps avoid leaving abandoned semaphore files.

When called directly from your application after SK_PLUS_NetworkSemaphoreCleanup was called without the SK_FLAGS_NETWORK_SEMAPHORE_NOCLEANUPTHREAD flag, the thread created for deleting orphaned semaphore files is terminated.

Syntax

C/C++
SK_ResultCode SK_PLUS_NetworkSemaphoreDispose(SK_ApiContext context, int flags);
Visual Basic
Declare Function SK_PLUS_NetworkSemaphoreDispose(ByVal context As Long, ByVal flags As Long) As Long

Arguments

context
The API Context handle.
flags
Any flags passed into this function-call.

Returns

All possible return values are included in the SK_ResultCode enumeration. Return codes to expect include:

Result Code Description
SK_ResultCode.SK_ERROR_NONE No error.
SK_ResultCode.SK_ERROR_INVALID_ARGUMENTS Some or all of the arguments are invalid.