Skip to content

M_CodeJam_Threading_ReaderWriterLockSlimExtensions_GetWriteLock

andrewvk edited this page Mar 30, 2016 · 7 revisions

ReaderWriterLockSlimExtensions.GetWriteLock Method

[This is preliminary documentation and is subject to change.]

Tries to enter the lock in write mode.

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

Syntax

C#

[PureAttribute]
public static ReaderWriterLockSlimExtensions.WriteLockScope GetWriteLock(
	[NotNullAttribute] this ReaderWriterLockSlim readerWriterLock
)

VB

<ExtensionAttribute>
<PureAttribute>
Public Shared Function GetWriteLock ( 
	<NotNullAttribute> readerWriterLock As ReaderWriterLockSlim
) As ReaderWriterLockSlimExtensions.WriteLockScope

F#

[<ExtensionAttribute>]
[<PureAttribute>]
static member GetWriteLock : 
        [<NotNullAttribute>] readerWriterLock : ReaderWriterLockSlim -> ReaderWriterLockSlimExtensions.WriteLockScope 

Parameters

 

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

Return Value

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