Open sandboxFocus

Class ThreadSafetyPolicy

When applied to an assembly, this policy will check for possible concurrency issues.

Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Assembly)]
[AttributeUsage(AttributeTargets.Assembly)]
public sealed class ThreadSafetyPolicy : ScalarConstraint, IScalarConstraint, IConstraint
Remarks

There are following concurrency issues that are recognized by this policy:

Thread safety of a type is determined by simple immutability analysis, i.e. the type does contain only

Constructors

Name Description
ThreadSafetyPolicy()

Methods

Name Description
ValidateCode(object)

Validates the element of code to which the constraint is applied.