Skip to content

Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) #83702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bolt/lib/Core/ParallelUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace ParallelUtilities {

namespace {
/// A single thread pool that is used to run parallel tasks
std::unique_ptr<ThreadPool> ThreadPoolPtr;
std::unique_ptr<DefaultThreadPool> ThreadPoolPtr;

unsigned computeCostFor(const BinaryFunction &BF,
const PredicateTy &SkipPredicate,
Expand Down Expand Up @@ -106,7 +106,7 @@ ThreadPoolInterface &getThreadPool() {
if (ThreadPoolPtr.get())
return *ThreadPoolPtr;

ThreadPoolPtr = std::make_unique<ThreadPool>(
ThreadPoolPtr = std::make_unique<DefaultThreadPool>(
llvm::hardware_concurrency(opts::ThreadCount));
return *ThreadPoolPtr;
}
Expand Down
2 changes: 1 addition & 1 deletion bolt/tools/merge-fdata/merge-fdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void mergeLegacyProfiles(const SmallVectorImpl<std::string> &Filenames) {
// least 4 tasks.
ThreadPoolStrategy S = optimal_concurrency(
std::max(Filenames.size() / 4, static_cast<size_t>(1)));
ThreadPool Pool(S);
DefaultThreadPool Pool(S);
DenseMap<llvm::thread::id, ProfileTy> ParsedProfiles(
Pool.getMaxConcurrency());
for (const auto &Filename : Filenames)
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Example usage for a project using a compile commands database:
Error = false;
llvm::sys::Mutex IndexMutex;
// ExecutorConcurrency is a flag exposed by AllTUsExecution.h
llvm::ThreadPool Pool(llvm::hardware_concurrency(ExecutorConcurrency));
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(ExecutorConcurrency));
for (auto &Group : USRToBitcode) {
Pool.async([&]() {
std::vector<std::unique_ptr<doc::Info>> Infos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool Merge(llvm::StringRef MergeDir, llvm::StringRef OutputFile) {

// Load all symbol files in MergeDir.
{
llvm::ThreadPool Pool;
llvm::DefaultThreadPool Pool;
for (llvm::sys::fs::directory_iterator Dir(MergeDir, EC), DirEnd;
Dir != DirEnd && !EC; Dir.increment(EC)) {
// Parse YAML files in parallel.
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Tooling/AllTUsExecution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ llvm::Error AllTUsToolExecutor::execute(
auto &Action = Actions.front();

{
llvm::ThreadPool Pool(llvm::hardware_concurrency(ThreadCount));
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(ThreadCount));
for (std::string File : Files) {
Pool.async(
[&](std::string Path) {
Expand Down
2 changes: 1 addition & 1 deletion clang/tools/clang-scan-deps/ClangScanDeps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {

DependencyScanningService Service(ScanMode, Format, OptimizeArgs,
EagerLoadModules);
llvm::ThreadPool Pool(llvm::hardware_concurrency(NumThreads));
llvm::DefaultThreadPool Pool(llvm::hardware_concurrency(NumThreads));
std::vector<std::unique_ptr<DependencyScanningTool>> WorkerTools;
for (unsigned I = 0; I < Pool.getMaxConcurrency(); ++I)
WorkerTools.push_back(std::make_unique<DependencyScanningTool>(Service));
Expand Down
2 changes: 1 addition & 1 deletion lld/MachO/Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Writer {

template <class LP> void run();

ThreadPool threadPool;
DefaultThreadPool threadPool;
std::unique_ptr<FileOutputBuffer> &buffer;
uint64_t addr = 0;
uint64_t fileOff = 0;
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Core/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static std::recursive_mutex *g_debugger_list_mutex_ptr =
nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain
static Debugger::DebuggerList *g_debugger_list_ptr =
nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain
static llvm::ThreadPool *g_thread_pool = nullptr;
static llvm::DefaultThreadPoolThreadPool *g_thread_pool = nullptr;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weirdly this issue wasn't caught in CI!


static constexpr OptionEnumValueElement g_show_disassembly_enum_values[] = {
{
Expand Down Expand Up @@ -609,7 +609,7 @@ void Debugger::Initialize(LoadPluginCallbackType load_plugin_callback) {
"Debugger::Initialize called more than once!");
g_debugger_list_mutex_ptr = new std::recursive_mutex();
g_debugger_list_ptr = new DebuggerList();
g_thread_pool = new llvm::ThreadPool(llvm::optimal_concurrency());
g_thread_pool = new llvm::DefaultThreadPool(llvm::optimal_concurrency());
g_load_plugin_callback = load_plugin_callback;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/docs/ORCv2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ or creating any Modules attached to it. E.g.

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

ThreadPool TP(NumThreads);
DefaultThreadPool TP(NumThreads);
JITStack J;

for (auto &ModulePath : ModulePaths) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class SpeculativeJIT {
std::unique_ptr<ExecutionSession> ES;
DataLayout DL;
MangleAndInterner Mangle{*ES, DL};
ThreadPool CompileThreads{llvm::hardware_concurrency(NumThreads)};
DefaultThreadPool CompileThreads{llvm::hardware_concurrency(NumThreads)};

JITDylib &MainJD;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class LLJIT {

DataLayout DL;
Triple TT;
std::unique_ptr<ThreadPool> CompileThreads;
std::unique_ptr<DefaultThreadPool> CompileThreads;

std::unique_ptr<ObjectLayer> ObjLinkingLayer;
std::unique_ptr<ObjectTransformLayer> ObjTransformLayer;
Expand Down
7 changes: 3 additions & 4 deletions llvm/include/llvm/Support/ThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ class StdThreadPool : public ThreadPoolInterface {
/// Maximum number of threads to potentially grow this pool to.
const unsigned MaxThreadCount;
};

#endif // LLVM_ENABLE_THREADS Disabled
#endif // LLVM_ENABLE_THREADS

/// A non-threaded implementation.
class SingleThreadExecutor : public ThreadPoolInterface {
Expand Down Expand Up @@ -253,9 +252,9 @@ class SingleThreadExecutor : public ThreadPoolInterface {
};

#if LLVM_ENABLE_THREADS
using ThreadPool = StdThreadPool;
using DefaultThreadPool = StdThreadPool;
#else
using ThreadPool = SingleThreadExecutor;
using DefaultThreadPool = SingleThreadExecutor;
#endif

/// A group of tasks to be run on a thread pool. Thread pool tasks in different
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/ParallelCG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void llvm::splitCodeGen(
// Create ThreadPool in nested scope so that threads will be joined
// on destruction.
{
ThreadPool CodegenThreadPool(hardware_concurrency(OSs.size()));
DefaultThreadPool CodegenThreadPool(hardware_concurrency(OSs.size()));
int ThreadCount = 0;

SplitModule(
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2935,7 +2935,7 @@ Error DWARFLinker::link() {
}
EmitLambda();
} else {
ThreadPool Pool(hardware_concurrency(2));
DefaultThreadPool Pool(hardware_concurrency(2));
Pool.async(AnalyzeAll);
Pool.async(CloneAll);
Pool.wait();
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Error DWARFLinkerImpl::link() {
Context->InputDWARFFile.unload();
}
} else {
ThreadPool Pool(llvm::parallel::strategy);
DefaultThreadPool Pool(llvm::parallel::strategy);
for (std::unique_ptr<LinkContext> &Context : ObjectContexts)
Pool.async([&]() {
// Link object file.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ Error DwarfTransformer::convert(uint32_t NumThreads, OutputAggregator &Out) {

// Now parse all DIEs in case we have cross compile unit references in a
// thread pool.
ThreadPool pool(hardware_concurrency(NumThreads));
DefaultThreadPool pool(hardware_concurrency(NumThreads));
for (const auto &CU : DICtx.compile_units())
pool.async([&CU]() { CU->getUnitDIE(false /*CUDieOnly*/); });
pool.wait();
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,8 @@ LLJIT::LLJIT(LLJITBuilderState &S, Error &Err)

if (S.NumCompileThreads > 0) {
InitHelperTransformLayer->setCloneToNewContextOnEmit(true);
CompileThreads =
std::make_unique<ThreadPool>(hardware_concurrency(S.NumCompileThreads));
CompileThreads = std::make_unique<DefaultThreadPool>(
hardware_concurrency(S.NumCompileThreads));
ES->setDispatchTask([this](std::unique_ptr<Task> T) {
// FIXME: We should be able to use move-capture here, but ThreadPool's
// AsyncTaskTys are std::functions rather than unique_functions
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/LTO/LTO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ class lto::ThinBackendProc {

namespace {
class InProcessThinBackend : public ThinBackendProc {
ThreadPool BackendThreadPool;
DefaultThreadPool BackendThreadPool;
AddStreamFn AddStream;
FileCache Cache;
std::set<GlobalValue::GUID> CfiFunctionDefs;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/LTO/LTOBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static void splitCodeGen(const Config &C, TargetMachine *TM,
AddStreamFn AddStream,
unsigned ParallelCodeGenParallelismLevel, Module &Mod,
const ModuleSummaryIndex &CombinedIndex) {
ThreadPool CodegenThreadPool(
DefaultThreadPool CodegenThreadPool(
heavyweight_hardware_concurrency(ParallelCodeGenParallelismLevel));
unsigned ThreadCount = 0;
const Target *T = &TM->getTarget();
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/LTO/ThinLTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ void ThinLTOCodeGenerator::run() {

if (CodeGenOnly) {
// Perform only parallel codegen and return.
ThreadPool Pool;
DefaultThreadPool Pool;
int count = 0;
for (auto &Mod : Modules) {
Pool.async([&](int count) {
Expand Down Expand Up @@ -1126,7 +1126,7 @@ void ThinLTOCodeGenerator::run() {

// Parallel optimizer + codegen
{
ThreadPool Pool(heavyweight_hardware_concurrency(ThreadCount));
DefaultThreadPool Pool(heavyweight_hardware_concurrency(ThreadCount));
for (auto IndexCount : ModulesOrdering) {
auto &Mod = Modules[IndexCount];
Pool.async([&](int count) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/BalancedPartitioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void BalancedPartitioning::run(std::vector<BPFunctionNode> &Nodes) const {
Nodes.size(), Config.SplitDepth, Config.IterationsPerSplit));
std::optional<BPThreadPool> TP;
#if LLVM_ENABLE_THREADS
ThreadPool TheThreadPool;
DefaultThreadPool TheThreadPool;
if (Config.TaskSplitDepth > 1)
TP.emplace(TheThreadPool);
#endif
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/dsymutil/dsymutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ int dsymutil_main(int argc, char **argv, const llvm::ToolContext &) {
S.ThreadsRequested = DebugMapPtrsOrErr->size();
S.Limit = true;
}
ThreadPool Threads(S);
DefaultThreadPool Threads(S);

// If there is more than one link to execute, we need to generate
// temporary files.
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-cov/CodeCoverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ int CodeCoverageTool::doShow(int argc, const char **argv,
ShowFilenames);
} else {
// In -output-dir mode, it's safe to use multiple threads to print files.
ThreadPool Pool(S);
DefaultThreadPool Pool(S);
for (const std::string &SourceFile : SourceFiles)
Pool.async(&CodeCoverageTool::writeSourceFileView, this, SourceFile,
Coverage.get(), Printer.get(), ShowFilenames);
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-cov/CoverageExporterJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ json::Array renderFiles(const coverage::CoverageMapping &Coverage,
S = heavyweight_hardware_concurrency(SourceFiles.size());
S.Limit = true;
}
ThreadPool Pool(S);
DefaultThreadPool Pool(S);
json::Array FileArray;
std::mutex FileArrayMutex;

Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-cov/CoverageReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ std::vector<FileCoverageSummary> CoverageReport::prepareFileReports(
S = heavyweight_hardware_concurrency(Files.size());
S.Limit = true;
}
ThreadPool Pool(S);
DefaultThreadPool Pool(S);

std::vector<FileCoverageSummary> FileReports;
FileReports.reserve(Files.size());
Expand Down Expand Up @@ -580,7 +580,7 @@ Expected<FileCoverageSummary> DirectoryCoverageReport::prepareDirectoryReports(
PoolS = heavyweight_hardware_concurrency(Files.size());
PoolS.Limit = true;
}
ThreadPool Pool(PoolS);
DefaultThreadPool Pool(PoolS);

TPool = &Pool;
LCPStack = {RootLCP};
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int llvm_debuginfod_main(int argc, char **argv, const llvm::ToolContext &) {
for (const std::string &Path : ScanPaths)
Paths.push_back(Path);

ThreadPool Pool(hardware_concurrency(MaxConcurrency));
DefaultThreadPool Pool(hardware_concurrency(MaxConcurrency));
DebuginfodLog Log;
DebuginfodCollection Collection(Paths, Log, Pool, MinInterval);
DebuginfodServer Server(Log, Collection);
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-profdata/llvm-profdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static void mergeInstrProfile(const WeightedFileVector &Inputs,
loadInput(Input, Remapper, Correlator.get(), ProfiledBinary,
Contexts[0].get());
} else {
ThreadPool Pool(hardware_concurrency(NumThreads));
DefaultThreadPool Pool(hardware_concurrency(NumThreads));

// Load the inputs in parallel (N/NumThreads serial steps).
unsigned Ctx = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-reduce/deltas/Delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void llvm::runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
std::unique_ptr<ThreadPoolInterface> ChunkThreadPoolPtr;
if (NumJobs > 1)
ChunkThreadPoolPtr =
std::make_unique<ThreadPool>(hardware_concurrency(NumJobs));
std::make_unique<DefaultThreadPool>(hardware_concurrency(NumJobs));

bool FoundAtLeastOneNewUninterestingChunkWithCurrentGranularity;
do {
Expand Down
4 changes: 2 additions & 2 deletions llvm/unittests/ADT/LazyAtomicPointerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace {
TEST(LazyAtomicPointer, loadOrGenerate) {
int Value = 0;
LazyAtomicPointer<int> Ptr;
ThreadPool Threads;
DefaultThreadPool Threads;
for (unsigned I = 0; I < 4; ++I)
Threads.async([&]() {
Ptr.loadOrGenerate([&]() {
Expand All @@ -38,7 +38,7 @@ TEST(LazyAtomicPointer, loadOrGenerate) {
TEST(LazyAtomicPointer, BusyState) {
int Value = 0;
LazyAtomicPointer<int> Ptr;
ThreadPool Threads;
DefaultThreadPool Threads;

std::mutex BusyLock, EndLock;
std::condition_variable Busy, End;
Expand Down
16 changes: 8 additions & 8 deletions llvm/unittests/Debuginfod/HTTPServerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ TEST_F(HTTPClientServerTest, Hello) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPRequest Request(Url);
Expand All @@ -116,7 +116,7 @@ TEST_F(HTTPClientServerTest, LambdaHandlerHello) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPRequest Request(Url);
Expand All @@ -135,7 +135,7 @@ TEST_F(HTTPClientServerTest, StreamingHello) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPRequest Request(Url);
Expand Down Expand Up @@ -167,7 +167,7 @@ TEST_F(HTTPClientServerTest, StreamingFileResponse) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPRequest Request(Url);
Expand Down Expand Up @@ -203,7 +203,7 @@ TEST_F(HTTPClientServerTest, StreamingMissingFileResponse) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPRequest Request(Url);
Expand All @@ -220,7 +220,7 @@ TEST_F(HTTPClientServerTest, ClientTimeout) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port);
HTTPClient Client;
Expand Down Expand Up @@ -257,7 +257,7 @@ TEST_F(HTTPClientServerTest, PathMatching) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port) + "/abc/1/2";
HTTPRequest Request(Url);
Expand Down Expand Up @@ -289,7 +289,7 @@ TEST_F(HTTPClientServerTest, FirstPathMatched) {
Expected<unsigned> PortOrErr = Server.bind();
EXPECT_THAT_EXPECTED(PortOrErr, Succeeded());
unsigned Port = *PortOrErr;
ThreadPool Pool(hardware_concurrency(1));
DefaultThreadPool Pool(hardware_concurrency(1));
Pool.async([&]() { EXPECT_THAT_ERROR(Server.listen(), Succeeded()); });
std::string Url = "http://localhost:" + utostr(Port) + "/abc/1/2";
HTTPRequest Request(Url);
Expand Down
Loading