Custom attribute that means that the async method to which it is applied can be safely
re-entered on each await statement. For lock-based models, it means that the lock
is released while awaiting. For the actor model, it means that other methods can be invoked
during awaiting.
Implements
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
[MulticastAttributeUsage(MulticastTargets.Method, AllowMultiple = false)]
public sealed class ReentrantAttribute : MulticastAttribute, IValidableAnnotationRemarks
This attribute is required on async methods of classes annotated with ActorAttribute, SynchronizedAttribute
or ReaderWriterSynchronizedAttribute; a build-time error is emitted otherwise. Applying it to a method that is not async
also results in a build-time error.
Constructors
| Name | Description |
|---|---|
| ReentrantAttribute() |
Methods
| Name | Description |
|---|---|
| CompileTimeValidate(object) | Method invoked at build time to ensure that the aspect has been applied to the right target. |