moved threads into base common hiearchy and started an a new cache manager.

This commit is contained in:
Mark Vejvoda
2010-04-30 22:54:24 +00:00
parent b10bb3c2bc
commit fd2274775e
10 changed files with 371 additions and 304 deletions

View File

@@ -19,7 +19,7 @@
#include <fcntl.h>
#include <map>
#include <vector>
#include "thread.h"
#include "base_thread.h"
using std::string;
@@ -37,6 +37,8 @@ using std::string;
#endif
using namespace Shared::PlatformCommon;
namespace Shared{ namespace Platform{
//
@@ -127,26 +129,14 @@ protected:
static void throwException(string str);
};
class BroadCastClientSocketThread : public Thread
class BroadCastClientSocketThread : public BaseThread
{
private:
Mutex mutexRunning;
Mutex mutexQuit;
bool quit;
bool running;
DiscoveredServersInterface *discoveredServersCB;
void setRunningStatus(bool value);
void setQuitStatus(bool value);
public:
BroadCastClientSocketThread(DiscoveredServersInterface *cb);
virtual void execute();
void signalQuit();
bool getQuitStatus();
bool getRunningStatus();
};
// =====================================================
@@ -168,24 +158,13 @@ protected:
static void startBroadCastClientThread(DiscoveredServersInterface *cb);
};
class BroadCastSocketThread : public Thread
class BroadCastSocketThread : public BaseThread
{
private:
Mutex mutexRunning;
Mutex mutexQuit;
bool quit;
bool running;
void setRunningStatus(bool value);
void setQuitStatus(bool value);
public:
BroadCastSocketThread();
virtual void execute();
void signalQuit();
bool getQuitStatus();
bool getRunningStatus();
};
// =====================================================