Compartilhar via


AsyncReaderWriterLock.HideLocks Method

Microsoft internal only. Prevents use or visibility of the caller's lock(s) until the returned value is disposed.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Public Function HideLocks As AsyncReaderWriterLock.Suppression
public AsyncReaderWriterLock.Suppression HideLocks()
public:
AsyncReaderWriterLock::Suppression HideLocks()
member HideLocks : unit -> AsyncReaderWriterLock.Suppression
public function HideLocks() : AsyncReaderWriterLock.Suppression

Return Value

Type: Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Suppression
The AsyncReaderWriterLock.Suppressionvto dispose to restore lock visibility.

Remarks

This can be used by a write lock holder that is about to fork execution in order to prevent the second thread from holding the exclusive write lock. The lock should be hidden just before kicking off the work and can be restored immediately after kicking off the work.

.NET Framework Security

See Also

Reference

AsyncReaderWriterLock Class

Microsoft.VisualStudio.Threading Namespace