Method | Description | |
---|---|---|
Enter ( object monitor ) : void |
Acquires an exclusive lock on the specified object.
|
|
Exit ( object monitor ) : void |
Releases an exclusive lock on the specified object.
|
|
Lock ( object monitor ) : IDisposable |
Locks the specified object and returns an IDisposable that can be used to release the lock.
|
|
TryEnter ( object monitor ) : bool |
Attempts, for the specified amount of time, to acquire an exclusive lock on the specified object.
|
|
TryEnter ( object monitor, System.TimeSpan timeout ) : bool |
Attempts, for the specified amount of time, to acquire an exclusive lock on the specified object.
|
|
TryEnter ( object monitor, int millisecondsTimeout ) : bool |
Attempts, for the specified amount of time, to acquire an exclusive lock on the specified object.
|
Method | Description | |
---|---|---|
CreateDeadlockDescription ( CycleComponentNode currentChain, Dictionary |
Creates a textual description of the deadlock.
|
|
CreateThreadAndLockTables ( Dictionary |
Generates mapping tables based on the data in _monitorStates.
|
|
ThrowIfDeadlockDetected ( MonitorState targetMs ) : void |
Throws an exception if a deadlock would be caused by the current thread waiting on the specified lock.
|
public static Enter ( object monitor ) : void | ||
monitor | object | The object on which to acquire the monitor lock. |
return | void |
public static Exit ( object monitor ) : void | ||
monitor | object | Releases an exclusive lock on the specified object. |
return | void |
public static Lock ( object monitor ) : IDisposable | ||
monitor | object | The object on which to acquire the monitor lock. |
return | IDisposable |
public static TryEnter ( object monitor ) : bool | ||
monitor | object | The object on which to acquire the lock. |
return | bool |
public static TryEnter ( object monitor, System.TimeSpan timeout ) : bool | ||
monitor | object | The object on which to acquire the lock. |
timeout | System.TimeSpan | A TimeSpan representing the amount of time to wait for the lock. A value of -1 millisecond specifies an infinite wait. |
return | bool |
public static TryEnter ( object monitor, int millisecondsTimeout ) : bool | ||
monitor | object | The object on which to acquire the lock. |
millisecondsTimeout | int | The number of milliseconds to wait for the lock. |
return | bool |