Skip to content

Commit

Permalink
feat: determine the number of threads based on the machine
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Dec 20, 2020
1 parent 9102ecc commit df97f87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
#include <iostream>
#include <utility>
#include <cassert>
#include <thread>

#include <napi.h>

using namespace std;

constexpr auto kMaxThreads = 16u;
static const auto kMaxThreads = std::thread::hardware_concurrency();

#ifdef ENABLE_DEBUG
// TODO does not work anymore because we added explicit to constructors
Expand Down

0 comments on commit df97f87

Please sign in to comment.