You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/12/11 00:59:32 UTC
svn commit: r1419898 -
/incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp
Author: benh
Date: Mon Dec 10 23:59:32 2012
New Revision: 1419898
URL: http://svn.apache.org/viewvc?rev=1419898&view=rev
Log:
Changed libprocess to always have at least 4 processing threads.
Modified:
incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp
Modified: incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp?rev=1419898&r1=1419897&r2=1419898&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp (original)
+++ incubator/mesos/branches/0.10.x/third_party/libprocess/src/process.cpp Mon Dec 10 23:59:32 2012
@@ -85,7 +85,6 @@ using std::deque;
using std::find;
using std::list;
using std::map;
-using std::max;
using std::ostream;
using std::pair;
using std::queue;
@@ -1242,7 +1241,7 @@ void initialize(const string& delegate)
socket_manager = new SocketManager();
// Setup processing threads.
- long cpus = sysconf(_SC_NPROCESSORS_ONLN);
+ long cpus = std::max(4L, sysconf(_SC_NPROCESSORS_ONLN));
for (int i = 0; i < cpus; i++) {
pthread_t thread; // For now, not saving handles on our threads.