void OutgoingAsyncBase::cancel(const Ice::LocalException& ex) { CancellationHandlerPtr handler; { Lock sync(_m); ICE_SET_EXCEPTION_FROM_CLONE(_cancellationException, ex.ice_clone()); if(!_cancellationHandler) { return; } handler = _cancellationHandler; } handler->asyncRequestCanceled(ICE_SHARED_FROM_THIS, ex); }
void AsyncResult::cancel(const Ice::LocalException& ex) { CancellationHandlerPtr handler; { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); _cancellationException.reset(ex.ice_clone()); if(!_cancellationHandler) { return; } handler = _cancellationHandler; } handler->asyncRequestCanceled(OutgoingAsyncBasePtr::dynamicCast(this), ex); }