mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
refactor: Make CCheckQueue constructor start worker threads
This commit is contained in:
parent
d03eaacbcf
commit
9cf89f7a5b
6 changed files with 18 additions and 40 deletions
|
|
@ -37,10 +37,11 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
|
|||
return true;
|
||||
}
|
||||
};
|
||||
CCheckQueue<PrevectorJob> queue {QUEUE_BATCH_SIZE};
|
||||
|
||||
// The main thread should be counted to prevent thread oversubscription, and
|
||||
// to decrease the variance of benchmark results.
|
||||
queue.StartWorkerThreads(GetNumCores() - 1);
|
||||
int worker_threads_num{GetNumCores() - 1};
|
||||
CCheckQueue<PrevectorJob> queue{QUEUE_BATCH_SIZE, worker_threads_num};
|
||||
|
||||
// create all the data once, then submit copies in the benchmark.
|
||||
FastRandomContext insecure_rand(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue