docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AsyncRequest

    Base class for representing an asynchronous request. AsyncRequest is a bit like Task, but doesn't always execute on the main thread like Task in Unity. Another difference, is that several different lambda functors can operate on different parts of the data in parallel. Once all lambda functors have completed, the request is marked as complete.

    Inheritance
    object
    AsyncRequest
    AsyncRequest<T>
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Simulation
    Assembly: solution.dll
    Syntax
    public abstract class AsyncRequest

    Fields

    Name Description
    _state

    Property which holds whether or not the request has started and or has an error.

    Properties

    Name Description
    completed

    Returns true if the request has completed.

    defaultExecutionContext

    Property specifying the default ExecutionContext to use when executing requests.

    error

    Returns true if the request has encountered an error.

    maxJobSystemParallelism

    When using the Unity Job System, jobs will chain after previous jobs in such a way as to only utilize maxJobSystemParallelism worker threads at any time. i.e. Setting this to 1 will result in jobs chaining back to back with no parallelism.

    started

    Returns true if the request has started.

    Methods

    Name Description
    AllResultsAreCompleted()

    Virtual method implemented by derived classes. Called to determine if all results are present and completed.

    AnyResultHasError()

    Virtual method implemented by derived classes. Called to determine if any result had an error.

    Reset()

    Virtual method implemented by derived classes. Resets the request. Called when returning to the object pool.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)