docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class WaitForCompletion

    Suspends the coroutine execution until worker has completed execution on a device and contents of the specified tensor are downloaded to the main CPU memory. WaitForCompletion is not necessary and should NOT be used, unless tensor contents are accessed on CPU! WaitForCompletion can only be used with a yield statement in coroutines.

    Inheritance
    object
    CustomYieldInstruction
    WaitForCompletion
    Implements
    IEnumerator
    Inherited Members
    CustomYieldInstruction.MoveNext()
    CustomYieldInstruction.Reset()
    CustomYieldInstruction.Current
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Barracuda
    Assembly: Unity.Barracuda.dll
    Syntax
    public class WaitForCompletion : CustomYieldInstruction, IEnumerator

    Constructors

    WaitForCompletion(Tensor)

    Suspends the coroutine execution until worker has completed execution on a device and contents of the specified tensor are downloaded to the main CPU memory.

    Declaration
    public WaitForCompletion(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    Tensor that will be downloaded once worker execution is finished

    Properties

    keepWaiting

    Returns true while results are not yet ready

    Declaration
    public override bool keepWaiting { get; }
    Property Value
    Type Description
    bool
    Overrides
    CustomYieldInstruction.keepWaiting

    Implements

    IEnumerator
    In This Article
    Back to top
    Copyright © 2025 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)