summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/bidir/CallbackI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/bidir/CallbackI.cpp')
-rw-r--r--cpp/demo/Ice/bidir/CallbackI.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/cpp/demo/Ice/bidir/CallbackI.cpp b/cpp/demo/Ice/bidir/CallbackI.cpp
index 05c6e288d82..d24888c0dd3 100644
--- a/cpp/demo/Ice/bidir/CallbackI.cpp
+++ b/cpp/demo/Ice/bidir/CallbackI.cpp
@@ -28,15 +28,15 @@ CallbackSenderI::destroy()
IceUtil::ThreadPtr callbackSenderThread;
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
-
- cout << "destroying callback sender" << endl;
- _destroy = true;
-
- notify();
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
+
+ cout << "destroying callback sender" << endl;
+ _destroy = true;
+
+ notify();
- callbackSenderThread = _callbackSenderThread;
- _callbackSenderThread = 0; // Resolve cyclic dependency.
+ callbackSenderThread = _callbackSenderThread;
+ _callbackSenderThread = 0; // Resolve cyclic dependency.
}
callbackSenderThread->getThreadControl().join();
@@ -66,27 +66,27 @@ CallbackSenderI::run()
while(!_destroy)
{
- timedWait(IceUtil::Time::seconds(2));
+ timedWait(IceUtil::Time::seconds(2));
- if(!_destroy && !_clients.empty())
- {
- ++_num;
-
- set<CallbackReceiverPrx>::iterator p = _clients.begin();
- while(p != _clients.end())
- {
- try
- {
- (*p)->callback(_num);
- ++p;
- }
- catch(const Exception& ex)
- {
- cerr << "removing client `" << _communicator->identityToString((*p)->ice_getIdentity()) << "':\n"
- << ex << endl;
- _clients.erase(p++);
- }
- }
- }
+ if(!_destroy && !_clients.empty())
+ {
+ ++_num;
+
+ set<CallbackReceiverPrx>::iterator p = _clients.begin();
+ while(p != _clients.end())
+ {
+ try
+ {
+ (*p)->callback(_num);
+ ++p;
+ }
+ catch(const Exception& ex)
+ {
+ cerr << "removing client `" << _communicator->identityToString((*p)->ice_getIdentity()) << "':\n"
+ << ex << endl;
+ _clients.erase(p++);
+ }
+ }
+ }
}
}