computed<T> method

AsyncSlotHandle<T> computed<T>(
  1. T compute(
    1. AsyncComputeContext ctx
    )
)

Create a synchronous computed on the async graph.

This is for derivations whose inputs are already local and synchronous, such as queue length or a subscription cursor. They resolve inline on get and therefore do not colour an otherwise synchronous Core API with Future.

Implementation

AsyncSlotHandle<T> computed<T>(T Function(AsyncComputeContext ctx) compute) =>
    AsyncSlotHandle<T>.sync(this, compute);