AsyncReaderWriterLock.OnBeforeWriteLockReleased Method
Microsoft internal only. Registers a callback that is invoked when the outermost write lock held by the caller is about to be released.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Sub OnBeforeWriteLockReleased ( _
action As Func(Of Task) _
)
public void OnBeforeWriteLockReleased(
Func<Task> action
)
public:
void OnBeforeWriteLockReleased(
Func<Task^>^ action
)
member OnBeforeWriteLockReleased :
action:Func<Task> -> unit
public function OnBeforeWriteLockReleased(
action : Func<Task>
)
Parameters
action
Type: System.Func<Task>The asynchronous delegate. Access to the write lock is provided throughout the asynchronous invocation.
Remarks
This supports scenarios in which a change event handler needs to inspect changes or make further changes at the conclusion of the lock. This method is safe to call from within a previously registered callback. A registered callback runs after the previously registered callbacks have completed execution. If the write lock is released to an upgradeable read lock, these callbacks are fired synchronously with respect to the writer that is releasing the lock. Otherwise, the callbacks are invoked asynchronously with respect to the releasing thread.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.