summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/dispatcher/Dispatcher.cpp12
-rw-r--r--cpp/test/Ice/dispatcher/Dispatcher.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/cpp/test/Ice/dispatcher/Dispatcher.cpp b/cpp/test/Ice/dispatcher/Dispatcher.cpp
index 53b3195dd97..f88fce0a2fe 100644
--- a/cpp/test/Ice/dispatcher/Dispatcher.cpp
+++ b/cpp/test/Ice/dispatcher/Dispatcher.cpp
@@ -10,7 +10,7 @@
#include <Dispatcher.h>
#include <TestCommon.h>
-Dispatcher* Dispatcher::_instance = 0;
+IceUtil::Handle<Dispatcher> Dispatcher::_instance;
Dispatcher::Dispatcher()
{
@@ -59,12 +59,12 @@ Dispatcher::run()
Ice::DispatcherCallPtr call;
{
Lock sync(*this);
-
+
while(!_terminated && _calls.empty())
- {
+ {
wait();
}
-
+
if(!_calls.empty())
{
call = _calls.front();
@@ -76,8 +76,8 @@ Dispatcher::run()
return;
}
}
-
-
+
+
if(call)
{
try
diff --git a/cpp/test/Ice/dispatcher/Dispatcher.h b/cpp/test/Ice/dispatcher/Dispatcher.h
index a6d10e0514c..ba81c3f8293 100644
--- a/cpp/test/Ice/dispatcher/Dispatcher.h
+++ b/cpp/test/Ice/dispatcher/Dispatcher.h
@@ -24,7 +24,7 @@ public:
Dispatcher();
virtual void dispatch(const Ice::DispatcherCallPtr&, const Ice::ConnectionPtr&);
-
+
static void terminate();
static bool isDispatcherThread();
@@ -32,7 +32,7 @@ private:
void run();
- static Dispatcher* _instance;
+ static IceUtil::Handle<Dispatcher> _instance;
std::deque<Ice::DispatcherCallPtr> _calls;
bool _terminated;