crash method

void crash([
  1. Object error = 'FakeWorkerTransport.crash()'
])

Simulates the worker dying: emits a stream error (not a protocol error envelope), which a pool treats as a crash of the in-flight task.

Implementation

void crash([Object error = 'FakeWorkerTransport.crash()']) {
  _messages.addError(error);
}