diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-01 14:02:05 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-01 14:02:05 +0100 |
commit | cd63c3e37dde04051fb2f4631f788bed7b48937b (patch) | |
tree | ae2c581bd228ec42c6eb46bf83a88f1174623bac /cpp/src/Ice/OutgoingAsync.cpp | |
parent | SLES RPM fixes (diff) | |
download | ice-cd63c3e37dde04051fb2f4631f788bed7b48937b.tar.bz2 ice-cd63c3e37dde04051fb2f4631f788bed7b48937b.tar.xz ice-cd63c3e37dde04051fb2f4631f788bed7b48937b.zip |
Added support for Ice::Dispatcher
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 1475e59b9ba..654ab9becba 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -45,19 +45,20 @@ const unsigned char Ice::AsyncResult::EndCalled = 0x8; namespace { -class AsynchronousException : public ThreadPoolWorkItem +class AsynchronousException : public DispatchWorkItem { public: - AsynchronousException(const Ice::AsyncResultPtr& result, const Ice::Exception& ex) : - _result(result), _exception(dynamic_cast<Ice::LocalException*>(ex.ice_clone())) + AsynchronousException(const IceInternal::InstancePtr& instance, + const Ice::AsyncResultPtr& result, + const Ice::Exception& ex) : + DispatchWorkItem(instance), _result(result), _exception(dynamic_cast<Ice::LocalException*>(ex.ice_clone())) { } virtual void - execute(ThreadPoolCurrent& current) + run() { - current.ioCompleted(); _result->__exception(*_exception.get()); } @@ -67,18 +68,18 @@ private: const auto_ptr<Ice::Exception> _exception; }; -class AsynchronousSent : public ThreadPoolWorkItem +class AsynchronousSent : public DispatchWorkItem { public: - AsynchronousSent(const Ice::AsyncResultPtr& result) : _result(result) + AsynchronousSent(const IceInternal::InstancePtr& instance, const Ice::AsyncResultPtr& result) : + DispatchWorkItem(instance), _result(result) { } virtual void - execute(ThreadPoolCurrent& current) + run() { - current.ioCompleted(); _result->__sent(); } @@ -236,7 +237,7 @@ Ice::AsyncResult::__sentAsync() // try { - _instance->clientThreadPool()->execute(new AsynchronousSent(this)); + _instance->clientThreadPool()->execute(new AsynchronousSent(_instance, this)); } catch(const Ice::CommunicatorDestroyedException&) { @@ -281,7 +282,7 @@ Ice::AsyncResult::__exceptionAsync(const Ice::Exception& ex) // try { - _instance->clientThreadPool()->execute(new AsynchronousException(this, ex)); + _instance->clientThreadPool()->execute(new AsynchronousException(_instance, this, ex)); } catch(const Ice::CommunicatorDestroyedException&) { |