AcquireAccessAsync(ObjectAccessLevel)
Asynchronously acquires access on the entity for the current thread and returns an async awaiter.
Declaration
ConcurrentAccessAwaiter AcquireAccessAsync(ObjectAccessLevel objectAccessLevel)
Parameters
Type | Name | Description |
---|---|---|
ObjectAccessLevel | objectAccessLevel | The required access level on the entity. |
Returns
Type | Description |
---|---|
ConcurrentAccessAwaiter | a ConcurrentAccessAwaiter compatible with the |
Remarks
When you are using this method through the expression threadAware.ConcurrentController.AcquireAccess
, there may be a race condition during the
evaluation of the expression. Use the AcquireAccessAsync(IThreadAware, ObjectAccessLevel) extension method to acquire access to a thread-aware object in a thread-safe manner.