spawn<T> method

Future<void> spawn<T>(
  1. void entryPoint(
    1. T message
    ),
  2. T message
)

Spawns a long-lived isolate for complex, two-way communication.

This operation is not supported on web and will throw an UnsupportedError.

Implementation

Future<void> spawn<T>(void Function(T message) entryPoint, T message) {
  throw UnsupportedError('Isolates cannot be spawned on the web platform.');
}