Description

System.Threading.SynchronizationLockException is thrown if the System.Threading.Monitor.Pulse, System.Threading.Monitor.PulseAll, or System.Threading.Monitor.Wait 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 System.Threading.Monitor.Exit 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 System.Threading.Monitor.Enter. To release the lock on an object, use System.Threading.Monitor.Exit.

Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.