We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5af06a7 + b7cd589 commit 8965e65Copy full SHA for 8965e65
1 file changed
options.cpp
@@ -8,6 +8,7 @@
8
#define basename /*SKIP IT*/
9
#endif
10
#include <boost/format.hpp>
11
+#include <algorithm>
12
#include <cstdio>
13
#include <cstring>
14
#include <osmium/version.hpp>
@@ -300,7 +301,7 @@ options_t::options_t()
300
301
output_backend("pgsql"), input_reader("auto"), bbox(boost::none),
302
extra_attributes(false), verbose(false)
303
{
- num_procs = std::thread::hardware_concurrency();
304
+ num_procs = (int) std::min(4U, std::thread::hardware_concurrency());
305
if (num_procs < 1) {
306
fprintf(stderr, "WARNING: unable to detect number of hardware threads supported!\n");
307
num_procs = 1;
0 commit comments