run method

Future<Response_T?> run({
  1. String? callbackId,
  2. Request_T? request,
})

Implementation

Future<Response_T?> run({
  String? callbackId,
  Request_T? request,
}) async {
  await _lock.lock();
  try {
    final asyncRunner = await super.nextAvailableRunner;

    return asyncRunner.runWithCallback<Request_T, Response_T, Message_T>(
      task: task,
      callback: callback,
      callbackId: callbackId,
      request: request,
    );
  } finally {
    _lock.unlock();
  }
}