send<T> method
Future<T>
send<T>(
- int command, {
- List args = const [],
- CancellationToken? token,
- bool inspectRequest = false,
- bool inspectResponse = false,
inherited
Sends a workload to the worker.
Implementation
Future<T> send<T>(
int command, {
List args = const [],
CancellationToken? token,
bool inspectRequest = false,
bool inspectResponse = false,
}) {
// ensure the worker is up and running
if (_channel != null) {
return _send(
_channel!, command, args, token, inspectRequest, inspectResponse);
} else {
return start().then((channel) => _send(
channel, command, args, token, inspectRequest, inspectResponse));
}
}