diff options
| author | Dan Engelbrecht <[email protected]> | 2022-03-22 23:35:52 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-03-31 11:29:26 +0200 |
| commit | 2a689093a4265a537a6f7334e982ca92bdc188b3 (patch) | |
| tree | 9e663aa30a667c66cc900a834800f62fc7473920 /zenstore/compactcas.cpp | |
| parent | Make garbage collection state copy less complex (diff) | |
| download | zen-2a689093a4265a537a6f7334e982ca92bdc188b3.tar.xz zen-2a689093a4265a537a6f7334e982ca92bdc188b3.zip | |
Just use one threadpool in threading test
Diffstat (limited to 'zenstore/compactcas.cpp')
| -rw-r--r-- | zenstore/compactcas.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp index 731f16a38..82ecf1a83 100644 --- a/zenstore/compactcas.cpp +++ b/zenstore/compactcas.cpp @@ -2072,12 +2072,11 @@ TEST_CASE("compactcas.threadedinsert") // * doctest::skip(true)) Chunks.emplace_back(Chunk); } + WorkerThreadPool ThreadPool(4); CasGc Gc; CasContainerStrategy Cas(CasConfig, Gc); Cas.Initialize("test", 32768, 16, true); { - WorkerThreadPool ThreadPool(4 /* std::thread::hardware_concurrency() + 2*/); // Flood it a little - for (int32_t Idx = 0; Idx < kChunkCount; ++Idx) { const IoBuffer& Chunk = Chunks[Idx]; @@ -2094,8 +2093,6 @@ TEST_CASE("compactcas.threadedinsert") // * doctest::skip(true)) CHECK_EQ(kChunkSize * kChunkCount, TotalSize); { - WorkerThreadPool ThreadPool(4 /* std::thread::hardware_concurrency() + 2*/); // Flood it a little - std::vector<IoHash> OldChunkHashes(ChunkHashes.begin(), ChunkHashes.end()); for (int32_t Idx = 0; Idx < kChunkCount; ++Idx) { @@ -2125,7 +2122,7 @@ TEST_CASE("compactcas.threadedinsert") // * doctest::skip(true)) NewChunks.emplace_back(Chunk); } - WorkerThreadPool ThreadPool(4 /* std::thread::hardware_concurrency() + 2*/); // Flood it a little +// WorkerThreadPool ThreadPool(4 /* std::thread::hardware_concurrency() + 2*/); // Flood it a little RwLock ChunkHashesLock; std::atomic_uint32_t AddedChunkCount; @@ -2228,8 +2225,6 @@ TEST_CASE("compactcas.threadedinsert") // * doctest::skip(true)) } } { - WorkerThreadPool ThreadPool(4 /* std::thread::hardware_concurrency() + 2*/); // Flood it a little - for (const auto& ChunkHash : GcChunkHashes) { ThreadPool.ScheduleWork([&Cas, ChunkHash]() { |