public void ReadResponseAsync(Action <Exception, RedisResponse> callBack) { var item = new PipelineItem(callBack); _responsesQueue.Enqueue(item); TryRunReceiveProcess(); }
public void ExecuteCommandAsync(byte[][] args, PipelineItem item) { if (_requestsQueue.Count > MaxQueueSize) { SpinWait.SpinUntil(() => _requestsQueue.Count < MaxQueueSize); } if (_pipelineException != null) { item.CallBack(_pipelineException, null); } else if (_pipelineIsInOneWayMode != 0 && !item.IsOneWay) { item.CallBack(new RedisException("Pipeline is in OneWay mode"), null); } else { _requestsQueue.Enqueue(item); TryStartSendProcess(); } }
public void ReadResponseAsync(Action<Exception, RedisResponse> callBack) { var item = new PipelineItem(callBack); _responsesQueue.Enqueue(item); TryRunReceiveProcess(); }
public void ExecuteCommandAsync(byte[][] args,PipelineItem item) { if (_requestsQueue.Count > MaxQueueSize) SpinWait.SpinUntil(() => _requestsQueue.Count < MaxQueueSize); if (_pipelineException != null) item.CallBack(_pipelineException, null); else if (_pipelineIsInOneWayMode != 0 && !item.IsOneWay) item.CallBack(new RedisException("Pipeline is in OneWay mode"), null); else { _requestsQueue.Enqueue(item); TryStartSendProcess(); } }