Mono Class Library: System.Threading Namespace

System.Threading.SynchronizationLockException Class

Represents the error that occurs when a method requires the caller to own the lock on a given System.Threading.Monitor , and the method is invoked by a caller that does not own that lock. [Edit]

See Also: SynchronizationLockException Members

System.Object
     System.Exception
          System.SystemException
               System.Threading.SynchronizationLockException

[System.Runtime.InteropServices.ComVisible(true)]
public class SynchronizationLockException : SystemException

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

System.Threading.SynchronizationLockException is thrown if the Monitor.Pulse(object), Monitor.PulseAll(object), or Monitor.Wait(object, int, bool) methods are invoked for a specified object, but the caller does not own the lock on that object.System.Threading.SynchronizationLockException is also thrown when the Monitor.Exit(object) method is called to release the lock on an object, but the caller does not own the lock on that object.

To acquire the lock on an object, use Monitor.Enter(object). To release the lock on an object, use Monitor.Exit(object).

[Edit]

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0