addCallback(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback cb) { RequestCallback callback = new RequestCallback(@ref, ttl, cb); lock (this) { if (!_response && _exception == null) { _callbacks.Add(callback); if (wellKnownRef != null) { // This request is to resolve the endpoints of a cached well-known object ref _wellKnownRefs.Add(wellKnownRef); } if (!_sent) { _sent = true; send(); } return; } } if (_response) { callback.response(_locatorInfo, _proxy); } else { Debug.Assert(_exception != null); callback.exception(_locatorInfo, _exception); } }
addCallback(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback cb) { _m.Lock(); try { RequestCallback callback = new RequestCallback(@ref, ttl, cb); if (_response) { callback.response(_locatorInfo, _proxy); } else if (_exception != null) { callback.exception(_locatorInfo, _exception); } else { _callbacks.Add(callback); if (wellKnownRef != null) { // This request is to resolve the endpoints of a cached well-known object ref _wellKnownRefs.Add(wellKnownRef); } if (!_sent) { _sent = true; send(true); } } } finally { _m.Unlock(); } }
addCallback(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback cb) { _m.Lock(); try { RequestCallback callback = new RequestCallback(@ref, ttl, cb); if(_response) { callback.response(_locatorInfo, _proxy); } else if(_exception != null) { callback.exception(_locatorInfo, _exception); } else { _callbacks.Add(callback); if(wellKnownRef != null) { // This request is to resolve the endpoints of a cached well-known object ref _wellKnownRefs.Add(wellKnownRef); } if(!_sent) { _sent = true; send(true); } } } finally { _m.Unlock(); } }
public void addCallback(Reference @ref, Reference wellKnownRef, int ttl, GetEndpointsCallback cb) { RequestCallback callback = new RequestCallback(@ref, ttl, cb); lock(this) { if(!_response && _exception == null) { _callbacks.Add(callback); if(wellKnownRef != null) { // This request is to resolve the endpoints of a cached well-known object ref _wellKnownRefs.Add(wellKnownRef); } if(!_sent) { _sent = true; send(); } return; } } if(_response) { callback.response(_locatorInfo, _proxy); } else { Debug.Assert(_exception != null); callback.exception(_locatorInfo, _exception); } }