Interface implemented by objects that are aware of concurrency. Access to thread-aware objects is controlled by a concurrency controller (IConcurrencyController).
Any aspect implementing a threading model (ThreadAwareObjectAttribute) introduces this interface to the target class and ensures that accesses to this class go through
the controller.
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Common.dll
Syntax
[InternalImplement(AttributeId = 627500528741416983)]
public interface IThreadAwareRemarks
Thread-aware does not mean thread-safe. Check the IsSharable property of ConcurrencyController to determine whether the current object can be shared between different threads.
A threading model can add this interface to an advisable collection, such as AdvisableCollection<T>, at run time. A cast of such a collection to IThreadAware fails; use QueryInterface<T>(object, bool) instead.
Properties
| Name | Description |
|---|---|
| ConcurrencyController | Gets the concurrency controller for the current object. |
Methods
| Name | Description |
|---|---|
| OnParentControllerChanged(IConcurrencyController) | Notifies the object that the effective controller of its parent has changed. |