add a --max-concurrency flag

It sets the max number of threads to use for a parallel job.
This is different that the number of total threads, since monero
binaries typically start a lot of them.
This commit is contained in:
moneromooo-monero
2016-04-28 20:25:33 +01:00
parent bdb93cbf3d
commit 513a658c87
8 changed files with 47 additions and 7 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ const unsigned int DB_BUFFER_LENGTH = 32 * MB;
const unsigned int DB_DEF_CACHESIZE = 256 * MB;
#if defined(BDB_BULK_CAN_THREAD)
const unsigned int DB_BUFFER_COUNT = boost::thread::hardware_concurrency();
const unsigned int DB_BUFFER_COUNT = tools::get_max_concurrency();
#else
const unsigned int DB_BUFFER_COUNT = 1;
#endif