Skip to content

M_CodeJam_Threading_ReaderWriterLockSlimExtensions_GetReadLock

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

ReaderWriterLockSlimExtensions.GetReadLock Method

Tries to enter the lock in read mode.

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

Syntax

C#

public static ReaderWriterLockSlimExtensions.ReadLockScope GetReadLock(
	this ReaderWriterLockSlim readerWriterLock
)

VB

<ExtensionAttribute>
Public Shared Function GetReadLock ( 
	readerWriterLock As ReaderWriterLockSlim
) As ReaderWriterLockSlimExtensions.ReadLockScope

F#

[<ExtensionAttribute>]
static member GetReadLock : 
        readerWriterLock : ReaderWriterLockSlim -> ReaderWriterLockSlimExtensions.ReadLockScope 

Parameters

 

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

Return Value

Type: ReaderWriterLockSlimExtensions.ReadLockScope
The IDisposable object that reduce the recursion count for read mode, and exits read 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