ComputeCallback<Q, R> typedef

R ComputeCallback (Q message)

Signature for the callback passed to compute.

Q is the type of the message that kicks off the computation.

R is the type of the value returned.

Instances of ComputeCallback must be top-level functions or static methods of classes, not closures or instance methods of objects.

There are limitations on the values that can be sent and received to and from isolates. These limitations constrain the values of Q and R that are possible. See the discussion at SendPort.send.

Implementation

typedef ComputeCallback<Q, R> = R Function(Q message);