Skip to content

M_CodeJam_Threading_ReaderWriterLockSlimExtensions_GetUpgradeableReadLock

Andrew Koryavchenko edited this page Jun 17, 2018 · 7 revisions

ReaderWriterLockSlimExtensions.GetUpgradeableReadLock Method

Tries to enter the lock in upgradeable mode.

Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static ReaderWriterLockSlimExtensions.UpgradeableReadLockScope GetUpgradeableReadLock(
	this ReaderWriterLockSlim readerWriterLock
)

VB

<ExtensionAttribute>
Public Shared Function GetUpgradeableReadLock ( 
	readerWriterLock As ReaderWriterLockSlim
) As ReaderWriterLockSlimExtensions.UpgradeableReadLockScope

F#

[<ExtensionAttribute>]
static member GetUpgradeableReadLock : 
        readerWriterLock : ReaderWriterLockSlim -> ReaderWriterLockSlimExtensions.UpgradeableReadLockScope 

Parameters

 

readerWriterLock
Type: System.Threading.ReaderWriterLockSlim
The ReaderWriterLockSlim instance.

Return Value

Type: ReaderWriterLockSlimExtensions.UpgradeableReadLockScope
The IDisposable object that reduce the recursion count for upgradeable mode, and exits upgradeable mode if the resulting count is 0 (zero).

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ReaderWriterLockSlim. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ReaderWriterLockSlimExtensions Class
CodeJam.Threading Namespace

Clone this wiki locally