System.Threading.Monitor: Method Members

The methods of System.Threading.Monitor are listed below. For a list of all members, see the Monitor Members list.

See Also: Inherited members from System.Object

Public Methods

static
Enter(object)

Acquires an exclusive lock on the specified object.

static
Enter(object, ref bool)
Documentation for this section has not yet been entered.
static
Exit(object)

Releases an exclusive lock on the specified object.

static
IsEntered(object) : bool

Determines whether the current thread holds the lock on the specified object.

static
Pulse(object)

Notifies a thread in the waiting queue of a change in the locked object's state.

static
PulseAll(object)

Notifies all waiting threads of a change in the object's state.

static
TryEnter(object) : bool

Attempts to acquire an exclusive lock on the specified object.

static
TryEnter(object, ref bool)
Documentation for this section has not yet been entered.
static
TryEnter(object, int) : bool

Attempts, for the specified number of milliseconds, to acquire an exclusive lock on the specified object.

static
TryEnter(object, TimeSpan) : bool

Attempts, for the specified amount of time, to acquire an exclusive lock on the specified object.

static
TryEnter(object, int, ref bool)
Documentation for this section has not yet been entered.
static
TryEnter(object, TimeSpan, ref bool)
Documentation for this section has not yet been entered.
static
Wait(object) : bool

Releases the lock on an object and blocks the current thread until it reacquires the lock.

static
Wait(object, int) : bool

Releases the lock on an object and blocks the current thread until it reacquires the lock. If the specified time-out interval elapses, the thread enters the ready queue.

static
Wait(object, TimeSpan) : bool

Releases the lock on an object and blocks the current thread until it reacquires the lock. If the specified time-out interval elapses, the thread enters the ready queue.

static
Wait(object, int, bool) : bool

Releases the lock on an object and blocks the current thread until it reacquires the lock. If the specified time-out interval elapses, the thread enters the ready queue. This method also specifies whether the synchronization domain for the context (if in a synchronized context) is exited before the wait and reacquired afterward.

static
Wait(object, TimeSpan, bool) : bool

Releases the lock on an object and blocks the current thread until it reacquires the lock. If the specified time-out interval elapses, the thread enters the ready queue. Optionally exits the synchronization domain for the synchronized context before the wait and reacquires the domain afterward.