Mutex.EarlyUnlockMutexEx

Syntax

Mutex.EarlyUnlockMutexEx( sequenceContextObj, threadId)

Purpose

Performs an AutoReleaser.EarlyReleaseEx on the most recent AutoReleaser object the Mutex.LockMutex method or the Mutex.LockMutexGroup method returns for the current thread.

Note This method does not necessarily release ownership of the mutex because the same thread can lock a mutex multiple times. Only after all locks have been released does the thread release ownership of the mutex.

Parameters

sequenceContextObj As Object

[In] Specifies a sequence context when you call this method from within a step of an execution. You must use the sequence context of the sequence in which you are calling this method. Pass a NULL reference when you do not call this method from an execution.

threadId As String

[In] Specifies a globally unique thread ID (GUID) for the thread that performs the operation. When you call this method from a TestStand execution, specify the value of the Thread.UniqueThreadId property for this parameter. Because the TestStand Synchronization Manager permits sharing of mutexes among computers, you must use an ID more unique than just the current operating system thread ID of the current thread on the current computer. When you plan to use mutexes across computers, use a GUID or some other way of creating a thread ID that is unique across all computers. The Thread.UniqueThreadId property is a GUID.

See Also

AutoReleaser.EarlyReleaseEx

Mutex.LockMutex

Mutex.LockMutexGroup

Thread.UniqueThreadId