Gemstone Threading Library
Show/Hide TOC

# AsyncReaderWriterLockTryEnterReadLockAsync(Int32) Method

Attempts to enter the lock with concurrent access where all readers can execute concurrently with respect to each other.

## Definition

Namespace: Gemstone.Threading
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.138 -- Release Build+45b5271a2dafa59bb75ccbb6019faabf2c5f392a
C#
View Source Request Example

    public Task<IDisposable> TryEnterReadLockAsync(
    	int milliseconds
    )

VB
View Source Request Example

    Public Function TryEnterReadLockAsync (
    	milliseconds As Integer
    ) As Task(Of IDisposable)

C++
View Source Request Example

    public:
    Task<IDisposable^>^ TryEnterReadLockAsync(
    	int milliseconds
    )

JavaScript
View Source Request Example

    function TryEnterReadLockAsync(milliseconds);

#### Parameters

milliseconds Int32
  The number of milliseconds to wait before timing out.

#### Return Value

Task IDisposable
The token used to control the duration of entry.

## Exceptions

TimeoutException | The lock could not be entered before the timeout expired.

## See Also

#### Reference

AsyncReaderWriterLock Class
TryEnterReadLockAsync Overload
Gemstone.Threading Namespace