Class IJobParallelForDeferExtensions | Jobs | 0.2.10-preview.12
docs.unity3d.com
    Show / Hide Table of Contents

    Class IJobParallelForDeferExtensions

    Inheritance
    Object
    IJobParallelForDeferExtensions
    Namespace: Unity.Jobs
    Syntax
    public static class IJobParallelForDeferExtensions

    Methods

    Schedule<T>(T, Int32*, Int32, JobHandle)

    Schedule the job for execution on worker threads. forEachCount is a pointer to the number of iterations, when dependsOn has completed. This API is unsafe, it is recommended to use the NativeList based Schedule method instead.

    Declaration
    public static JobHandle Schedule<T>(this T jobData, int *forEachCount, int innerloopBatchCount, JobHandle dependsOn = null)
        where T : struct, IJobParallelForDefer
    Parameters
    Type Name Description
    T jobData
    Int32* forEachCount
    Int32 innerloopBatchCount
    JobHandle dependsOn
    Returns
    Type Description
    JobHandle
    Type Parameters
    Name Description
    T

    Schedule<T, U>(T, NativeList<U>, Int32, JobHandle)

    Schedule the job for execution on worker threads. list.Length is used as the iteration count. Note that it is required to embed the list on the job struct as well.

    Declaration
    public static JobHandle Schedule<T, U>(this T jobData, NativeList<U> list, int innerloopBatchCount, JobHandle dependsOn = null)
        where T : struct, IJobParallelForDefer where U : struct
    Parameters
    Type Name Description
    T jobData

    The job and data to schedule.

    NativeList<U> list

    list.Length is used as the iteration count.

    Int32 innerloopBatchCount

    Granularity in which workstealing is performed. A value of 32, means the job queue will steal 32 iterations and then perform them in an efficient inner loop.

    JobHandle dependsOn

    Dependencies are used to ensure that a job executes on workerthreads after the dependency has completed execution. Making sure that two jobs reading or writing to same data do not run in parallel.

    Returns
    Type Description
    JobHandle

    JobHandle The handle identifying the scheduled job. Can be used as a dependency for a later job or ensure completion on the main thread.

    Type Parameters
    Name Description
    T
    U
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023