Skip to content

Commit

Permalink
Reduce the max number of threads allowed for the Pool to 32.
Browse files Browse the repository at this point in the history
This should still be plenty and might help with test failures on
mips architectures.
  • Loading branch information
joto committed Aug 16, 2017
1 parent 07cf3c7 commit aa5bb5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/osmium/thread/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace osmium {

// Maximum number of allowed pool threads (just to keep the user
// from setting something silly).
constexpr const int max_pool_threads = 256;
constexpr const int max_pool_threads = 32;

inline int get_pool_size(int num_threads, int user_setting, unsigned hardware_concurrency) {
if (num_threads == 0) {
Expand Down
4 changes: 2 additions & 2 deletions test/t/thread/test_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ TEST_CASE("number of threads in pool") {
REQUIRE(osmium::thread::detail::get_pool_size( 0, 8, 16) == 8);

// outliers
REQUIRE(osmium::thread::detail::get_pool_size(-100, 0, 16) == 1);
REQUIRE(osmium::thread::detail::get_pool_size(1000, 0, 16) == 256);
REQUIRE(osmium::thread::detail::get_pool_size(-100, 0, 16) == 1);
REQUIRE(osmium::thread::detail::get_pool_size(1000, 0, 16) == 32);

}

Expand Down

0 comments on commit aa5bb5b

Please sign in to comment.