Releases the lock.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub Exit ( _
useMemoryBarrier As Boolean _
) |
C# |
---|
public void Exit(
bool useMemoryBarrier
) |
Parameters
- useMemoryBarrier
- Type: System..::.Boolean
A Boolean value that indicates whether a memory fence should be issued in order to immediately
publish the exit operation to other threads.
Remarks
Exceptions
Exception | Condition |
---|
System.Threading..::.SynchronizationLockException |
Thread ownership tracking is enabled, and the current thread is not the owner of this lock.
|
See Also