ComputeImpl typedef
ComputeImpl =
Future<R> Function<Q, R>(ComputeCallback<Q, R> callback, Q message, {String? debugLabel})
The signature of compute, which spawns an isolate, runs callback
on
that isolate, passes it message
, and (eventually) returns the value
returned by callback
.
The function used as callback
must be one that can be sent to an isolate.
The debugLabel
argument can be specified to provide a name to add to the
Timeline. This is useful when profiling an application.
Implementation
typedef ComputeImpl = Future<R> Function<Q, R>(
ComputeCallback<Q, R> callback, Q message,
{String? debugLabel});