TwclMutex Class

The class represents a mutex synchronization object.

Namespace: wclSync
type
 TwclMutex = class(TwclNamedSyncObject)
 end;

The TwclMutex type exposes the following members.

Show:
 NameDescription
Create(THandle)

Overloaded. Creates new mutex object. (Overrides TwclNamedSyncObject.Create(THandle).)

Top
Show:
 NameDescription
Handle

Gets the system dependent synchronization object handle. (Inherited from TwclWaitableSyncObject.)

Top
Show:
 NameDescription
Acquire

Overloaded. Acquires the mutex object.

Acquire(Cardinal)

Overloaded. Tries to acquire the mutex object during the given time-out interval.

Create

Overloaded. Creates an unnamed mutex object.

Create(string)

Overloaded. Creates or opens a named mutex object.

Create(string,Boolean)

Overloaded. Creates or opens a named mutex object.

MakeUniqueName(string)

Makes unique synchronization object name. (Inherited from TwclNamedSyncObject.)

Open(string)

Opens an existing mutex with the specified name.

Release

Releases the mutex object.

WaitAll(Cardinal,PwclWaitableSyncObject)

Overloaded. Waits until all of the specified objects are in the signaled state. (Inherited from TwclWaitableSyncObject.)

WaitAll(Cardinal,PwclWaitableSyncObject,Cardinal)

Overloaded. Waits until all of the specified objects are in the signaled state or the time-out interval elapses. (Inherited from TwclWaitableSyncObject.)

WaitAny(Cardinal,PwclWaitableSyncObject)

Overloaded. Waits until one or all of the specified objects are in the signaled state. (Inherited from TwclWaitableSyncObject.)

WaitAny(Cardinal,PwclWaitableSyncObject,Cardinal)

Overloaded. Waits until one of the specified objects are in the signaled state or the time-out interval elapses. (Inherited from TwclWaitableSyncObject.)

WaitOne

Overloaded. Waits until the object is in the signaled state. (Inherited from TwclWaitableSyncObject.)

WaitOne(Cardinal)

Overloaded. Waits until the object is in the signaled state or the time-out interval elapses. (Inherited from TwclWaitableSyncObject.)

Top

A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. Only one thread at a time can own a mutex object, whose name comes from the fact that it is useful in coordinating mutually exclusive access to a shared resource.