Skip to content

Commit

Permalink
Fixed ICE-7336 - dispatcher test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
bentoi committed Sep 12, 2016
1 parent a2dc11b commit aad75ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cpp/test/Ice/dispatcher/Dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <Dispatcher.h>
#include <TestCommon.h>

Dispatcher* Dispatcher::_instance = 0;
IceUtil::Handle<Dispatcher> Dispatcher::_instance;

Dispatcher::Dispatcher()
{
Expand Down Expand Up @@ -59,12 +59,12 @@ Dispatcher::run()
Ice::DispatcherCallPtr call;
{
Lock sync(*this);

while(!_terminated && _calls.empty())
{
{
wait();
}

if(!_calls.empty())
{
call = _calls.front();
Expand All @@ -76,8 +76,8 @@ Dispatcher::run()
return;
}
}


if(call)
{
try
Expand Down
4 changes: 2 additions & 2 deletions cpp/test/Ice/dispatcher/Dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class Dispatcher : public Ice::Dispatcher, IceUtil::Thread, IceUtil::Monitor<Ice
Dispatcher();

virtual void dispatch(const Ice::DispatcherCallPtr&, const Ice::ConnectionPtr&);

static void terminate();
static bool isDispatcherThread();

private:

void run();

static Dispatcher* _instance;
static IceUtil::Handle<Dispatcher> _instance;

std::deque<Ice::DispatcherCallPtr> _calls;
bool _terminated;
Expand Down

0 comments on commit aad75ac

Please sign in to comment.