Contents

InferenceFunction.AsyncMutableValue

An async value which can be provided as a mutable argument to an inference function.

Declaration

struct AsyncMutableValue

Overview

When dispatching an encode(inputs:states:outputViews:to:), mutable values are what is included in the states and output vaiews.

Similar to InferenceFunction.AsyncValue, this type is a wrapper around an underlying inference value, however this type may be mutated repeatedly after construction by providing it as a state argument in sequence to one or more inference functions.

When encoding a sequence of inferences which each mutate the same AsyncMutableValue, the framework will insert the necessary synchronization to avoid it being read or written while a previous write is occurring.

Topics

Initializers

Instance Properties