Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Threading Namespace / IConcurrency­Controller Interface

IConcurrencyController Interface

Controls access to an entity from possibly several threads.

Namespace:  PostSharp.Patterns.Threading
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.1.3.0 (5.1.3.0)
Syntax
C#
public interface IConcurrencyController

The IConcurrencyController type exposes the following members.

Properties
  NameDescription
Public propertyIsReadOnly
Determines whether the entity is currently read-only.
Public propertyIsSharable
Determines whether the entity can currently be accessed concurrently by several threads.
Public propertyThreadingModel
Gets the ThreadingModel implemented by the current controller.
Methods
  NameDescription
Public methodAcquireAccess
Acquires access on the entity for the current thread and waits synchronously if access cannot be immediately acquired.
Public methodAcquireAccessAsync
Asynchronously acquires access on the entity for the current thread and returns an async awaiter.
Public methodCheckAccess
Determines whether the current thread has a specified level of access to the entity.
Public methodRequireAccess
Determines whether the current thread has a specified level of access to the entity and throws an exception if not.
Remarks

An entity, for the sake of this documentation article, is a group of objects that share the same concurrency controller.

Objects that are controlled by a concurrency controller implement the IThreadAware interface.

See Also