send abstract method

void send(
  1. String workerName,
  2. dynamic message, [
  3. List<Object>? transfer
])

Sends a message to the named worker. The message can consist of any data you could put into a JSON object, plus MessagePort (although if you're using this library, you may want to let it worry about port sharing).

If the target worker hasn't invoked getChannel for this worker yet, the message will queue up locally and wait for a channel to be opened. This can cause memory leaks, so make sure to open communication channels and start consuming messages from them as soon as you can in each worker!

For info about how the underlying messaging works in Web Workers, see: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/postMessage

Implementation

void send(String workerName, dynamic message, [List<Object>? transfer]);