mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 20:49:50 +01:00
refactor: Use move semantics in CCheckQueue::Loop
Co-authored-by: Martin Leitner-Ankerl <martin.ankerl@gmail.com>
This commit is contained in:
@@ -29,7 +29,6 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
|
||||
|
||||
struct PrevectorJob {
|
||||
prevector<PREVECTOR_SIZE, uint8_t> p;
|
||||
PrevectorJob() = default;
|
||||
explicit PrevectorJob(FastRandomContext& insecure_rand){
|
||||
p.resize(insecure_rand.randrange(PREVECTOR_SIZE*2));
|
||||
}
|
||||
@@ -37,10 +36,6 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
void swap(PrevectorJob& x) noexcept
|
||||
{
|
||||
p.swap(x.p);
|
||||
};
|
||||
};
|
||||
CCheckQueue<PrevectorJob> queue {QUEUE_BATCH_SIZE};
|
||||
// The main thread should be counted to prevent thread oversubscription, and
|
||||
|
||||
Reference in New Issue
Block a user