Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 184.108.40.206 (220.127.116.11)
ConcurrentAccessAwaiter AcquireAccessAsync( ObjectAccessLevel objectAccessLevel )
- Type: PostSharp.Patterns.Model.ObjectAccessLevel
The required access level on the entity.
Return ValueType: ConcurrentAccessAwaiter
a ConcurrentAccessAwaiter compatible with the await keyword, and evaluating to an opaque ConcurrentAccessToken typically used in a using block. Consumers must invoke the Complete() method upon success before exiting the using block.
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.