From 77f164fbfd66918cb6ad000c17bb79005b582e0e Mon Sep 17 00:00:00 2001 From: Pedro Eugenio Rocha Pedreira Date: Mon, 9 Dec 2024 18:13:15 -0800 Subject: [PATCH] refactor: Use KeepAlive instead of Executor*" (#112) Summary: X-link: https://github.com/facebookincubator/velox/pull/11785 Original PR got reverted as it conflicted with a different internal change. Resubmitting it. Original PR: https://github.com/facebookincubator/velox/pull/11732 Reviewed By: xiaoxmeng Differential Revision: D66911053 --- dwio/nimble/tablet/tests/TabletTests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dwio/nimble/tablet/tests/TabletTests.cpp b/dwio/nimble/tablet/tests/TabletTests.cpp index 80d53d7..e505e7f 100644 --- a/dwio/nimble/tablet/tests/TabletTests.cpp +++ b/dwio/nimble/tablet/tests/TabletTests.cpp @@ -553,7 +553,7 @@ TEST(TabletTests, OptionalSections) { tabletWriter.close(); - folly::CPUThreadPoolExecutor executor{5}; + auto executor = std::make_shared(5); facebook::velox::dwio::common::ExecutorBarrier barrier{executor}; for (auto useChaniedBuffers : {false, true}) { @@ -914,7 +914,7 @@ TEST(TabletTests, ReferenceCountedCacheStressParallelDuplicates) { ++counter; return std::make_shared(id); }}; - folly::CPUThreadPoolExecutor executor(10); + auto executor = std::make_shared(10); velox::dwio::common::ExecutorBarrier barrier(executor); constexpr int kEntryIds = 100; constexpr int kEntryDuplicates = 10; @@ -937,7 +937,7 @@ TEST(TabletTests, ReferenceCountedCacheStressParallelDuplicatesSaveEntries) { return std::make_shared(id); }}; folly::Synchronized>> entries; - folly::CPUThreadPoolExecutor executor(10); + auto executor = std::make_shared(10); velox::dwio::common::ExecutorBarrier barrier(executor); constexpr int kEntryIds = 100; constexpr int kEntryDuplicates = 10; @@ -960,7 +960,7 @@ TEST(TabletTests, ReferenceCountedCacheStress) { ++counter; return std::make_shared(id); }}; - folly::CPUThreadPoolExecutor executor(10); + auto executor = std::make_shared(10); velox::dwio::common::ExecutorBarrier barrier(executor); constexpr int kEntryIds = 100; constexpr int kEntryDuplicates = 10; @@ -982,7 +982,7 @@ TEST(TabletTests, ReferenceCountedCacheStressSaveEntries) { return std::make_shared(id); }}; folly::Synchronized>> entries; - folly::CPUThreadPoolExecutor executor(10); + auto executor = std::make_shared(10); velox::dwio::common::ExecutorBarrier barrier(executor); constexpr int kEntryIds = 100; constexpr int kEntryDuplicates = 10;