NativeDisableParallelForRestrictionAttribute
Indicates that multiple jobs can safely access the same NativeContainer at the same time.
Read time 3 minutesLast updated 13 days ago
Definition
- Type: Class
- Namespace: Unity.Collections
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Field)]public sealed class NativeDisableParallelForRestrictionAttribute : Attribute
Remarks
Usually it's unsafe for multiple jobs to access the same NativeContainer at the same time. This attribute makes it safe to do so, and is a required attribute for [wiki:JobSystemParallelForJobs|parallel jobs]]. A parallel job needs this attribute because you must define how to safely access a native container yourself, and lets you ignore multiple reads and writes to a container.
NativeDisableParallelForRestriction