Stay single-threaded on windows, multithread is slower and exit does not work
This commit is contained in:
parent
d6b230043c
commit
361d3aa256
@ -26,8 +26,17 @@
|
|||||||
// Go c++11 !
|
// Go c++11 !
|
||||||
bool getCpuConf(CpuConf& cpus)
|
bool getCpuConf(CpuConf& cpus)
|
||||||
{
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
|
// On windows, indexing is actually twice slower with threads
|
||||||
|
// enabled + there is a bug and the process does not exit at the
|
||||||
|
// end of indexing. Until these are solved, pretend there is only
|
||||||
|
// 1 cpu
|
||||||
|
cpus.ncpus = 1;
|
||||||
|
#else
|
||||||
// c++11
|
// c++11
|
||||||
cpus.ncpus = std::thread::hardware_concurrency();
|
cpus.ncpus = std::thread::hardware_concurrency();
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user