Class WaitForCompletion
Provides methods for suspending the execution of coroutines until the worker completes execution on a device, and Sentis downloads the contents of the specified tensor to the main CPU memory.
You usually shouldn't use WaitForCompletion
, unless you access tensor contents on the CPU.
You can only use WaitForCompletion
with a yield
statement in coroutines.
Inherited Members
UnityEngine.CustomYieldInstruction.MoveNext()
UnityEngine.CustomYieldInstruction.Reset()
UnityEngine.CustomYieldInstruction.Current
Namespace: Unity.Sentis
Syntax
public class WaitForCompletion : CustomYieldInstruction, IEnumerator
Constructors
WaitForCompletion(Tensor)
Suspends the execution of coroutines until the worker completes execution on a device, and Sentis downloads the contents of the specified tensor to the main CPU memory.
Declaration
public WaitForCompletion(Tensor tensor)
Parameters
Type | Name | Description |
---|---|---|
Tensor | tensor |
|
Properties
keepWaiting
Checks if the results of model execution are ready. Returns true
when the results are ready.
Declaration
public override bool keepWaiting { get; }
Property Value
Type | Description |
---|---|
Boolean |