properly deal with clients that talked to another campaign server before
A campaign server now tells all clients a unique run ID (the UNIX timestamp when it was started). This allows us to ignore results from "old" clients that talked to another server before, and to tell them to die. git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1677 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "config/FailConfig.hpp"
|
||||
|
||||
#include <list>
|
||||
#include <ctime>
|
||||
|
||||
#ifndef __puma
|
||||
#include <boost/thread.hpp>
|
||||
@ -37,7 +38,7 @@ private:
|
||||
unsigned m_maxThreads;
|
||||
//! the maximal timeout per communication thread
|
||||
int m_threadtimeout;
|
||||
//! A of spawned threads
|
||||
//! list of spawned threads
|
||||
#ifndef __puma
|
||||
typedef std::list<boost::thread*> Tthreadlist;
|
||||
Tthreadlist m_threadlist;
|
||||
@ -45,6 +46,9 @@ private:
|
||||
boost::thread* m_serverThread;
|
||||
#endif // puma
|
||||
|
||||
//! unique server run ID
|
||||
uint64_t m_runid;
|
||||
|
||||
#ifdef SERVER_PERFORMANCE_MEASURE
|
||||
static volatile unsigned m_DoneCount; //! the number of finished jobs
|
||||
#ifndef __puma
|
||||
@ -75,6 +79,7 @@ public:
|
||||
JobServer(int port = SERVER_COMM_TCP_PORT) : m_port(port), m_finish(false), m_noMoreExps(false),
|
||||
m_maxThreads(128), m_threadtimeout(0)
|
||||
{
|
||||
m_runid = std::time(0);
|
||||
#ifndef __puma
|
||||
m_serverThread = new boost::thread(&JobServer::run, this); // run operator()() in a thread.
|
||||
#ifdef SERVER_PERFORMANCE_MEASURE
|
||||
|
||||
Reference in New Issue
Block a user