Skip to content

Commit f961f22

Browse files
committed
Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC)
The base class llvm::ThreadPoolInterface will be renamed llvm::ThreadPool in a subsequent commit.
1 parent 90e9e96 commit f961f22

File tree

40 files changed

+75
-76
lines changed

40 files changed

+75
-76
lines changed

bolt/include/bolt/Core/ParallelUtilities.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ enum SchedulingPolicy {
4949
SP_BB_QUADRATIC, /// cost is estimated by the square of the BB count
5050
};
5151

52-
/// Return the managed thread pool and initialize it if not initiliazed.
53-
ThreadPool &getThreadPool();
52+
/// Return the managed thread pool and initialize it if not initialized.
53+
ThreadPoolInterface &getThreadPool();
5454

5555
/// Perform the work on each BinaryFunction except those that are accepted
5656
/// by SkipPredicate, scheduling heuristic is based on SchedPolicy.

bolt/lib/Core/ParallelUtilities.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace ParallelUtilities {
4949

5050
namespace {
5151
/// A single thread pool that is used to run parallel tasks
52-
std::unique_ptr<ThreadPool> ThreadPoolPtr;
52+
std::unique_ptr<DefaultThreadPool> ThreadPoolPtr;
5353

5454
unsigned computeCostFor(const BinaryFunction &BF,
5555
const PredicateTy &SkipPredicate,
@@ -102,11 +102,11 @@ inline unsigned estimateTotalCost(const BinaryContext &BC,
102102

103103
} // namespace
104104

105-
ThreadPool &getThreadPool() {
105+
ThreadPoolInterface &getThreadPool() {
106106
if (ThreadPoolPtr.get())
107107
return *ThreadPoolPtr;
108108

109-
ThreadPoolPtr = std::make_unique<ThreadPool>(
109+
ThreadPoolPtr = std::make_unique<DefaultThreadPool>(
110110
llvm::hardware_concurrency(opts::ThreadCount));
111111
return *ThreadPoolPtr;
112112
}
@@ -145,7 +145,7 @@ void runOnEachFunction(BinaryContext &BC, SchedulingPolicy SchedPolicy,
145145
TotalCost > BlocksCount ? TotalCost / BlocksCount : 1;
146146

147147
// Divide work into blocks of equal cost
148-
ThreadPool &Pool = getThreadPool();
148+
ThreadPoolInterface &Pool = getThreadPool();
149149
auto BlockBegin = BC.getBinaryFunctions().begin();
150150
unsigned CurrentCost = 0;
151151

@@ -202,7 +202,7 @@ void runOnEachFunctionWithUniqueAllocId(
202202
TotalCost > BlocksCount ? TotalCost / BlocksCount : 1;
203203

204204
// Divide work into blocks of equal cost
205-
ThreadPool &Pool = getThreadPool();
205+
ThreadPoolInterface &Pool = getThreadPool();
206206
auto BlockBegin = BC.getBinaryFunctions().begin();
207207
unsigned CurrentCost = 0;
208208
unsigned AllocId = 1;

bolt/lib/Passes/IdenticalCodeFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ Error IdenticalCodeFolding::runOnFunctions(BinaryContext &BC) {
397397
Timer SinglePass("single fold pass", "single fold pass");
398398
LLVM_DEBUG(SinglePass.startTimer());
399399

400-
ThreadPool *ThPool;
400+
ThreadPoolInterface *ThPool;
401401
if (!opts::NoThreads)
402402
ThPool = &ParallelUtilities::getThreadPool();
403403

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ void DWARFRewriter::updateDebugInfo() {
784784
}
785785
} else {
786786
// Update unit debug info in parallel
787-
ThreadPool &ThreadPool = ParallelUtilities::getThreadPool();
787+
ThreadPoolInterface &ThreadPool = ParallelUtilities::getThreadPool();
788788
for (std::unique_ptr<DWARFUnit> &CU : BC.DwCtx->compile_units())
789789
ThreadPool.async(processUnitDIE, CU.get(), &DIEBlder);
790790
ThreadPool.wait();

bolt/tools/merge-fdata/merge-fdata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ void mergeLegacyProfiles(const SmallVectorImpl<std::string> &Filenames) {
316316
// least 4 tasks.
317317
ThreadPoolStrategy S = optimal_concurrency(
318318
std::max(Filenames.size() / 4, static_cast<size_t>(1)));
319-
ThreadPool Pool(S);
319+
DefaultThreadPool Pool(S);
320320
DenseMap<llvm::thread::id, ProfileTy> ParsedProfiles(
321321
Pool.getMaxConcurrency());
322322
for (const auto &Filename : Filenames)

clang-tools-extra/clang-doc/tool/ClangDocMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Example usage for a project using a compile commands database:
238238
Error = false;
239239
llvm::sys::Mutex IndexMutex;
240240
// ExecutorConcurrency is a flag exposed by AllTUsExecution.h
241-
llvm::ThreadPool Pool(llvm::hardware_concurrency(ExecutorConcurrency));
241+
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(ExecutorConcurrency));
242242
for (auto &Group : USRToBitcode) {
243243
Pool.async([&]() {
244244
std::vector<std::unique_ptr<doc::Info>> Infos;

clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool Merge(llvm::StringRef MergeDir, llvm::StringRef OutputFile) {
8989

9090
// Load all symbol files in MergeDir.
9191
{
92-
llvm::ThreadPool Pool;
92+
llvm::DefaultThreadPool Pool;
9393
for (llvm::sys::fs::directory_iterator Dir(MergeDir, EC), DirEnd;
9494
Dir != DirEnd && !EC; Dir.increment(EC)) {
9595
// Parse YAML files in parallel.

clang/lib/Tooling/AllTUsExecution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ llvm::Error AllTUsToolExecutor::execute(
115115
auto &Action = Actions.front();
116116

117117
{
118-
llvm::ThreadPool Pool(llvm::hardware_concurrency(ThreadCount));
118+
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(ThreadCount));
119119
for (std::string File : Files) {
120120
Pool.async(
121121
[&](std::string Path) {

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
869869

870870
DependencyScanningService Service(ScanMode, Format, OptimizeArgs,
871871
EagerLoadModules);
872-
llvm::ThreadPool Pool(llvm::hardware_concurrency(NumThreads));
872+
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(NumThreads));
873873
std::vector<std::unique_ptr<DependencyScanningTool>> WorkerTools;
874874
for (unsigned I = 0; I < Pool.getMaxConcurrency(); ++I)
875875
WorkerTools.push_back(std::make_unique<DependencyScanningTool>(Service));

lld/MachO/Writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Writer {
6666

6767
template <class LP> void run();
6868

69-
ThreadPool threadPool;
69+
DefaultThreadPool threadPool;
7070
std::unique_ptr<FileOutputBuffer> &buffer;
7171
uint64_t addr = 0;
7272
uint64_t fileOff = 0;

lldb/source/Core/Debugger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static std::recursive_mutex *g_debugger_list_mutex_ptr =
104104
nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain
105105
static Debugger::DebuggerList *g_debugger_list_ptr =
106106
nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain
107-
static llvm::ThreadPool *g_thread_pool = nullptr;
107+
static llvm::DefaultThreadPoolThreadPool *g_thread_pool = nullptr;
108108

109109
static constexpr OptionEnumValueElement g_show_disassembly_enum_values[] = {
110110
{
@@ -609,7 +609,7 @@ void Debugger::Initialize(LoadPluginCallbackType load_plugin_callback) {
609609
"Debugger::Initialize called more than once!");
610610
g_debugger_list_mutex_ptr = new std::recursive_mutex();
611611
g_debugger_list_ptr = new DebuggerList();
612-
g_thread_pool = new llvm::ThreadPool(llvm::optimal_concurrency());
612+
g_thread_pool = new llvm::DefaultThreadPool(llvm::optimal_concurrency());
613613
g_load_plugin_callback = load_plugin_callback;
614614
}
615615

llvm/docs/ORCv2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ or creating any Modules attached to it. E.g.
738738

739739
ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
740740

741-
ThreadPool TP(NumThreads);
741+
DefaultThreadPool TP(NumThreads);
742742
JITStack J;
743743

744744
for (auto &ModulePath : ModulePaths) {

llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class SpeculativeJIT {
136136
std::unique_ptr<ExecutionSession> ES;
137137
DataLayout DL;
138138
MangleAndInterner Mangle{*ES, DL};
139-
ThreadPool CompileThreads{llvm::hardware_concurrency(NumThreads)};
139+
DefaultThreadPool CompileThreads{llvm::hardware_concurrency(NumThreads)};
140140

141141
JITDylib &MainJD;
142142

llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class LLJIT {
254254

255255
DataLayout DL;
256256
Triple TT;
257-
std::unique_ptr<ThreadPool> CompileThreads;
257+
std::unique_ptr<DefaultThreadPool> CompileThreads;
258258

259259
std::unique_ptr<ObjectLayer> ObjLinkingLayer;
260260
std::unique_ptr<ObjectTransformLayer> ObjTransformLayer;

llvm/include/llvm/Support/ThreadPool.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ class StdThreadPool : public ThreadPoolInterface {
212212
/// Maximum number of threads to potentially grow this pool to.
213213
const unsigned MaxThreadCount;
214214
};
215-
216-
#endif // LLVM_ENABLE_THREADS Disabled
215+
#endif // LLVM_ENABLE_THREADS
217216

218217
/// A non-threaded implementation.
219218
class SingleThreadExecutor : public ThreadPoolInterface {
@@ -253,9 +252,9 @@ class SingleThreadExecutor : public ThreadPoolInterface {
253252
};
254253

255254
#if LLVM_ENABLE_THREADS
256-
using ThreadPool = StdThreadPool;
255+
using DefaultThreadPool = StdThreadPool;
257256
#else
258-
using ThreadPool = SingleThreadExecutor;
257+
using DefaultThreadPool = SingleThreadExecutor;
259258
#endif
260259

261260
/// A group of tasks to be run on a thread pool. Thread pool tasks in different

llvm/lib/CodeGen/ParallelCG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void llvm::splitCodeGen(
5252
// Create ThreadPool in nested scope so that threads will be joined
5353
// on destruction.
5454
{
55-
ThreadPool CodegenThreadPool(hardware_concurrency(OSs.size()));
55+
DefaultThreadPool CodegenThreadPool(hardware_concurrency(OSs.size()));
5656
int ThreadCount = 0;
5757

5858
SplitModule(

llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,7 @@ Error DWARFLinker::link() {
29352935
}
29362936
EmitLambda();
29372937
} else {
2938-
ThreadPool Pool(hardware_concurrency(2));
2938+
DefaultThreadPool Pool(hardware_concurrency(2));
29392939
Pool.async(AnalyzeAll);
29402940
Pool.async(CloneAll);
29412941
Pool.wait();

llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Error DWARFLinkerImpl::link() {
192192
Context->InputDWARFFile.unload();
193193
}
194194
} else {
195-
ThreadPool Pool(llvm::parallel::strategy);
195+
DefaultThreadPool Pool(llvm::parallel::strategy);
196196
for (std::unique_ptr<LinkContext> &Context : ObjectContexts)
197197
Pool.async([&]() {
198198
// Link object file.

llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ Error DwarfTransformer::convert(uint32_t NumThreads, OutputAggregator &Out) {
601601

602602
// Now parse all DIEs in case we have cross compile unit references in a
603603
// thread pool.
604-
ThreadPool pool(hardware_concurrency(NumThreads));
604+
DefaultThreadPool pool(hardware_concurrency(NumThreads));
605605
for (const auto &CU : DICtx.compile_units())
606606
pool.async([&CU]() { CU->getUnitDIE(false /*CUDieOnly*/); });
607607
pool.wait();

llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,8 @@ LLJIT::LLJIT(LLJITBuilderState &S, Error &Err)
972972

973973
if (S.NumCompileThreads > 0) {
974974
InitHelperTransformLayer->setCloneToNewContextOnEmit(true);
975-
CompileThreads =
976-
std::make_unique<ThreadPool>(hardware_concurrency(S.NumCompileThreads));
975+
CompileThreads = std::make_unique<DefaultThreadPool>(
976+
hardware_concurrency(S.NumCompileThreads));
977977
ES->setDispatchTask([this](std::unique_ptr<Task> T) {
978978
// FIXME: We should be able to use move-capture here, but ThreadPool's
979979
// AsyncTaskTys are std::functions rather than unique_functions

llvm/lib/LTO/LTO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ class lto::ThinBackendProc {
14091409

14101410
namespace {
14111411
class InProcessThinBackend : public ThinBackendProc {
1412-
ThreadPool BackendThreadPool;
1412+
DefaultThreadPool BackendThreadPool;
14131413
AddStreamFn AddStream;
14141414
FileCache Cache;
14151415
std::set<GlobalValue::GUID> CfiFunctionDefs;

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static void splitCodeGen(const Config &C, TargetMachine *TM,
431431
AddStreamFn AddStream,
432432
unsigned ParallelCodeGenParallelismLevel, Module &Mod,
433433
const ModuleSummaryIndex &CombinedIndex) {
434-
ThreadPool CodegenThreadPool(
434+
DefaultThreadPool CodegenThreadPool(
435435
heavyweight_hardware_concurrency(ParallelCodeGenParallelismLevel));
436436
unsigned ThreadCount = 0;
437437
const Target *T = &TM->getTarget();

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ void ThinLTOCodeGenerator::run() {
980980

981981
if (CodeGenOnly) {
982982
// Perform only parallel codegen and return.
983-
ThreadPool Pool;
983+
DefaultThreadPool Pool;
984984
int count = 0;
985985
for (auto &Mod : Modules) {
986986
Pool.async([&](int count) {
@@ -1126,7 +1126,7 @@ void ThinLTOCodeGenerator::run() {
11261126

11271127
// Parallel optimizer + codegen
11281128
{
1129-
ThreadPool Pool(heavyweight_hardware_concurrency(ThreadCount));
1129+
DefaultThreadPool Pool(heavyweight_hardware_concurrency(ThreadCount));
11301130
for (auto IndexCount : ModulesOrdering) {
11311131
auto &Mod = Modules[IndexCount];
11321132
Pool.async([&](int count) {

llvm/lib/Support/BalancedPartitioning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void BalancedPartitioning::run(std::vector<BPFunctionNode> &Nodes) const {
8282
Nodes.size(), Config.SplitDepth, Config.IterationsPerSplit));
8383
std::optional<BPThreadPool> TP;
8484
#if LLVM_ENABLE_THREADS
85-
ThreadPool TheThreadPool;
85+
DefaultThreadPool TheThreadPool;
8686
if (Config.TaskSplitDepth > 1)
8787
TP.emplace(TheThreadPool);
8888
#endif

llvm/tools/dsymutil/dsymutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ int dsymutil_main(int argc, char **argv, const llvm::ToolContext &) {
734734
S.ThreadsRequested = DebugMapPtrsOrErr->size();
735735
S.Limit = true;
736736
}
737-
ThreadPool Threads(S);
737+
DefaultThreadPool Threads(S);
738738

739739
// If there is more than one link to execute, we need to generate
740740
// temporary files.

llvm/tools/llvm-cov/CodeCoverage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ int CodeCoverageTool::doShow(int argc, const char **argv,
12171217
ShowFilenames);
12181218
} else {
12191219
// In -output-dir mode, it's safe to use multiple threads to print files.
1220-
ThreadPool Pool(S);
1220+
DefaultThreadPool Pool(S);
12211221
for (const std::string &SourceFile : SourceFiles)
12221222
Pool.async(&CodeCoverageTool::writeSourceFileView, this, SourceFile,
12231223
Coverage.get(), Printer.get(), ShowFilenames);

llvm/tools/llvm-cov/CoverageExporterJson.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ json::Array renderFiles(const coverage::CoverageMapping &Coverage,
277277
S = heavyweight_hardware_concurrency(SourceFiles.size());
278278
S.Limit = true;
279279
}
280-
ThreadPool Pool(S);
280+
DefaultThreadPool Pool(S);
281281
json::Array FileArray;
282282
std::mutex FileArrayMutex;
283283

llvm/tools/llvm-cov/CoverageReport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ std::vector<FileCoverageSummary> CoverageReport::prepareFileReports(
465465
S = heavyweight_hardware_concurrency(Files.size());
466466
S.Limit = true;
467467
}
468-
ThreadPool Pool(S);
468+
DefaultThreadPool Pool(S);
469469

470470
std::vector<FileCoverageSummary> FileReports;
471471
FileReports.reserve(Files.size());
@@ -580,7 +580,7 @@ Expected<FileCoverageSummary> DirectoryCoverageReport::prepareDirectoryReports(
580580
PoolS = heavyweight_hardware_concurrency(Files.size());
581581
PoolS.Limit = true;
582582
}
583-
ThreadPool Pool(PoolS);
583+
DefaultThreadPool Pool(PoolS);
584584

585585
TPool = &Pool;
586586
LCPStack = {RootLCP};

llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int llvm_debuginfod_main(int argc, char **argv, const llvm::ToolContext &) {
127127
for (const std::string &Path : ScanPaths)
128128
Paths.push_back(Path);
129129

130-
ThreadPool Pool(hardware_concurrency(MaxConcurrency));
130+
DefaultThreadPool Pool(hardware_concurrency(MaxConcurrency));
131131
DebuginfodLog Log;
132132
DebuginfodCollection Collection(Paths, Log, Pool, MinInterval);
133133
DebuginfodServer Server(Log, Collection);

llvm/tools/llvm-profdata/llvm-profdata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ static void mergeInstrProfile(const WeightedFileVector &Inputs,
898898
loadInput(Input, Remapper, Correlator.get(), ProfiledBinary,
899899
Contexts[0].get());
900900
} else {
901-
ThreadPool Pool(hardware_concurrency(NumThreads));
901+
DefaultThreadPool Pool(hardware_concurrency(NumThreads));
902902

903903
// Load the inputs in parallel (N/NumThreads serial steps).
904904
unsigned Ctx = 0;

llvm/tools/llvm-reduce/deltas/Delta.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ void llvm::runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
219219
}
220220

221221
std::atomic<bool> AnyReduced;
222-
std::unique_ptr<ThreadPool> ChunkThreadPoolPtr;
222+
std::unique_ptr<ThreadPoolInterface> ChunkThreadPoolPtr;
223223
if (NumJobs > 1)
224224
ChunkThreadPoolPtr =
225-
std::make_unique<ThreadPool>(hardware_concurrency(NumJobs));
225+
std::make_unique<DefaultThreadPool>(hardware_concurrency(NumJobs));
226226

227227
bool FoundAtLeastOneNewUninterestingChunkWithCurrentGranularity;
228228
do {
@@ -251,7 +251,7 @@ void llvm::runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
251251
unsigned NumInitialTasks = std::min(WorkLeft, unsigned(NumJobs));
252252
unsigned NumChunksProcessed = 0;
253253

254-
ThreadPool &ChunkThreadPool = *ChunkThreadPoolPtr;
254+
ThreadPoolInterface &ChunkThreadPool = *ChunkThreadPoolPtr;
255255
assert(TaskQueue.empty());
256256

257257
AnyReduced = false;

llvm/unittests/ADT/LazyAtomicPointerTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace {
1818
TEST(LazyAtomicPointer, loadOrGenerate) {
1919
int Value = 0;
2020
LazyAtomicPointer<int> Ptr;
21-
ThreadPool Threads;
21+
DefaultThreadPool Threads;
2222
for (unsigned I = 0; I < 4; ++I)
2323
Threads.async([&]() {
2424
Ptr.loadOrGenerate([&]() {
@@ -38,7 +38,7 @@ TEST(LazyAtomicPointer, loadOrGenerate) {
3838
TEST(LazyAtomicPointer, BusyState) {
3939
int Value = 0;
4040
LazyAtomicPointer<int> Ptr;
41-
ThreadPool Threads;
41+
DefaultThreadPool Threads;
4242

4343
std::mutex BusyLock, EndLock;
4444
std::condition_variable Busy, End;

0 commit comments

Comments
 (0)