docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AsyncRequest<T>

    Concrete AsyncRequest for specific type T.

    Inheritance
    object
    AsyncRequest
    AsyncRequest<T>
    Implements
    IDisposable
    Inherited Members
    AsyncRequest.defaultExecutionContext
    AsyncRequest.maxJobSystemParallelism
    AsyncRequest.started
    AsyncRequest.error
    AsyncRequest.completed
    AsyncRequest._state
    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 class AsyncRequest<T> : AsyncRequest, IDisposable
    Type Parameters
    Name Description
    T

    Constructors

    Name Description
    AsyncRequest()

    Default constructor for AsyncRequest.

    Properties

    Name Description
    data

    Returns a reference to the payload for this request.

    results

    Array of asynchronous results.

    Methods

    Name Description
    AllResultsAreCompleted()

    All results are completed if...

    1. The request was started.
    2. There are no callbacks in flight.
    3. All results are marked completed.
    AnyResultHasError()

    Returns true if any of the results had an error.

    Dispose()

    Disposes the request. This will add the request back to the object pool.

    DontCare(AsyncRequest<T>)

    You can use this method to complete a request without needing a lambda function. Passing null will likely cause work to be skipped, but passing this will do it and complete.

    Enqueue(Func<AsyncRequest<T>, Result>)

    Queues a unit of work that can be executed on start.

    Execute(ExecutionContext)

    Starts executing all the queued callback functions in the given execution context.

    ~AsyncRequest()
    Reset()

    Resets the request. Called when adding back to the object pool.

    Start(Func<AsyncRequest<T>, Result>, ExecutionContext)

    Queues a callback that needs to be executed in the given execution context, and starts the request.

    Operators

    Name Description
    operator +(AsyncRequest<T>, Func<AsyncRequest<T>, Result>)

    Operator overload for adding functors to the AsyncRequest queue.

    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)