public void Cancel() { lock (myLock) { CheckNotDisposed(); CheckStarted(); cancelRequested = true; } // grpc_call_cancel is threadsafe call.Cancel(); }
/// <summary> /// Requests cancelling the call. /// </summary> public void Cancel() { lock (myLock) { Preconditions.CheckState(started); cancelRequested = true; if (!disposed) { call.Cancel(); } } }