Skip to content

Commit

Permalink
Revert D66724539: refactor: Use KeepAlive instead of Executor*
Browse files Browse the repository at this point in the history
Differential Revision:
D66724539

Original commit changeset: 231527346bdd

Original Phabricator Diff: D66724539

fbshipit-source-id: a239159cc880400a3ef4650ad842f43331ac5d73
  • Loading branch information
Wenbin Lin authored and facebook-github-bot committed Dec 5, 2024
1 parent 86e1158 commit 63b3d81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dwio/nimble/tablet/tests/TabletTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ TEST(TabletTests, OptionalSections) {

tabletWriter.close();

auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(5);
folly::CPUThreadPoolExecutor executor{5};
facebook::velox::dwio::common::ExecutorBarrier barrier{executor};

for (auto useChaniedBuffers : {false, true}) {
Expand Down Expand Up @@ -914,7 +914,7 @@ TEST(TabletTests, ReferenceCountedCacheStressParallelDuplicates) {
++counter;
return std::make_shared<int>(id);
}};
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(10);
folly::CPUThreadPoolExecutor executor(10);
velox::dwio::common::ExecutorBarrier barrier(executor);
constexpr int kEntryIds = 100;
constexpr int kEntryDuplicates = 10;
Expand All @@ -937,7 +937,7 @@ TEST(TabletTests, ReferenceCountedCacheStressParallelDuplicatesSaveEntries) {
return std::make_shared<int>(id);
}};
folly::Synchronized<std::vector<std::shared_ptr<int>>> entries;
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(10);
folly::CPUThreadPoolExecutor executor(10);
velox::dwio::common::ExecutorBarrier barrier(executor);
constexpr int kEntryIds = 100;
constexpr int kEntryDuplicates = 10;
Expand All @@ -960,7 +960,7 @@ TEST(TabletTests, ReferenceCountedCacheStress) {
++counter;
return std::make_shared<int>(id);
}};
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(10);
folly::CPUThreadPoolExecutor executor(10);
velox::dwio::common::ExecutorBarrier barrier(executor);
constexpr int kEntryIds = 100;
constexpr int kEntryDuplicates = 10;
Expand All @@ -982,7 +982,7 @@ TEST(TabletTests, ReferenceCountedCacheStressSaveEntries) {
return std::make_shared<int>(id);
}};
folly::Synchronized<std::vector<std::shared_ptr<int>>> entries;
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(10);
folly::CPUThreadPoolExecutor executor(10);
velox::dwio::common::ExecutorBarrier barrier(executor);
constexpr int kEntryIds = 100;
constexpr int kEntryDuplicates = 10;
Expand Down

0 comments on commit 63b3d81

Please sign in to comment.