diff --git a/src/core/config/CMakeLists.txt b/src/core/config/CMakeLists.txt index 6b6c31be..3c2ded8d 100644 --- a/src/core/config/CMakeLists.txt +++ b/src/core/config/CMakeLists.txt @@ -23,6 +23,7 @@ OPTION(CONFIG_FAST_BREAKPOINTS "Enable fast breakpoints (requires break OPTION(CONFIG_FAST_WATCHPOINTS "Enable fast watchpoints (requires memory access events to be enabled)" OFF) SET(SERVER_COMM_HOSTNAME "localhost" CACHE STRING "Job-server hostname or IP") SET(SERVER_COMM_TCP_PORT "1111" CACHE STRING "Job-server TCP port") +SET(SERVER_OUT_QUEUE_SIZE "0" CACHE STRING "Queue size for outbound jobs (0 = unlimited)") SET(SERVER_PERF_LOG_PATH "perf.log" CACHE STRING "A file name for storing the server's performance log (CSV)") SET(SERVER_PERF_STEPPING_SEC "1" CACHE STRING "Stepping of performance measurements in seconds") SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client's backoff phase in seconds") diff --git a/src/core/config/FailConfig.hpp.in b/src/core/config/FailConfig.hpp.in index 85559b28..4e9ac0d3 100644 --- a/src/core/config/FailConfig.hpp.in +++ b/src/core/config/FailConfig.hpp.in @@ -33,6 +33,7 @@ #cmakedefine SERVER_PERFORMANCE_MEASURE #define SERVER_COMM_HOSTNAME "@SERVER_COMM_HOSTNAME@" #define SERVER_COMM_TCP_PORT @SERVER_COMM_TCP_PORT@ +#define SERVER_OUT_QUEUE_SIZE @SERVER_OUT_QUEUE_SIZE@ #define SERVER_PERF_LOG_PATH "@SERVER_PERF_LOG_PATH@" #define SERVER_PERF_STEPPING_SEC @SERVER_PERF_STEPPING_SEC@ #define CLIENT_RAND_BACKOFF_TSTART @CLIENT_RAND_BACKOFF_TSTART@ diff --git a/src/core/cpn/JobServer.hpp b/src/core/cpn/JobServer.hpp index 65b5b3b3..74ef1ab1 100644 --- a/src/core/cpn/JobServer.hpp +++ b/src/core/cpn/JobServer.hpp @@ -78,7 +78,7 @@ private: public: JobServer(int port = SERVER_COMM_TCP_PORT) : m_port(port), m_finish(false), m_noMoreExps(false), - m_maxThreads(128), m_threadtimeout(0) + m_maxThreads(128), m_threadtimeout(0), m_undoneJobs(SERVER_OUT_QUEUE_SIZE) { m_runid = std::time(0); #ifndef __puma