diff options
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 69d9d30..f84f209 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -3814,8 +3814,11 @@ connected: | |||
| 3814 | // ------------------------------------------------------------------ | 3814 | // ------------------------------------------------------------------ |
| 3815 | int nWorkers = nHashThreads > 0 ? nHashThreads | 3815 | int nWorkers = nHashThreads > 0 ? nHashThreads |
| 3816 | : (int)std::thread::hardware_concurrency(); | 3816 | : (int)std::thread::hardware_concurrency(); |
| 3817 | if (nWorkers < 2) nWorkers = 2; | 3817 | if (nHashThreads <= 0) { |
| 3818 | if (nHashThreads <= 0) nWorkers -= 1; // leave one core for node + I/O threads | 3818 | if (nWorkers < 2) nWorkers = 2; |
| 3819 | nWorkers -= 1; // leave one core for node + I/O threads | ||
| 3820 | } | ||
| 3821 | // explicit /hashthreads=N is honored exactly (including 1) | ||
| 3819 | ParticipantJobShared jobShared; | 3822 | ParticipantJobShared jobShared; |
| 3820 | std::vector<ParticipantShareHit> shareHits; | 3823 | std::vector<ParticipantShareHit> shareHits; |
| 3821 | std::mutex shareHitsMtx; | 3824 | std::mutex shareHitsMtx; |