private void RequestStarting(Message message, IDuplexRequest request) { if (request != null) { this.Requests.Add(request); this.correlator.Add <IDuplexRequest>(message, request); } this.pending++; }
bool HandleRequestAsReplyCore(Message message) { IDuplexRequest request = correlator.Find <IDuplexRequest>(message, true); if (request != null) { request.GotReply(message); return(true); } return(false); }
// ASSUMPTION: (mmaruch) caller holds lock (this.mutex) private void RequestCompleting(IDuplexRequest request) { _pending--; if (_pending == 0) { _requests = null; } else if ((request != null) && (_requests != null)) { _requests.Remove(request); } }
// ASSUMPTION: (mmaruch) caller holds lock (this.mutex) void RequestCompleting(IDuplexRequest request) { pending--; if (pending == 0) { requests = null; } else if ((request != null) && (requests != null)) { requests.Remove(request); } }
// ASSUMPTION: (mmaruch) caller holds lock (this.mutex) void RequestStarting(Message message, IDuplexRequest request) { if (request != null) { Requests.Add(request); if (!requestAborted) { correlator.Add <IDuplexRequest>(message, request); } } pending++; }