callRemoteMethod<R> method

Future<R> callRemoteMethod<R>(
  1. Action action
)

Pass Action with required params to the remote instance and get result. Re-throws expcetion should the action fail in the executing isolate

Implementation

Future<R> callRemoteMethod<R>(Action action) {
  if (_pool.state == IsolatePoolState.stoped) {
    throw IsolatePoolStopped('Isolate pool has been stoped, cant call pooled instnace method');
  }
  return _pool._sendRequest<R>(_instanceId, action);
}