Skip to content

Commit

Permalink
refactor: Use KeepAlive instead of Executor*"
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookincubator/velox#11785

Original PR got reverted as it conflicted with a different internal change.
Resubmitting it.

Original PR: facebookincubator/velox#11732

Differential Revision: D66911053
  • Loading branch information
pedroerp authored and facebook-github-bot committed Dec 7, 2024
1 parent 5955884 commit c672cff
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();

folly::CPUThreadPoolExecutor executor{5};
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(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);
}};
folly::CPUThreadPoolExecutor executor(10);
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(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;
folly::CPUThreadPoolExecutor executor(10);
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(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);
}};
folly::CPUThreadPoolExecutor executor(10);
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(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;
folly::CPUThreadPoolExecutor executor(10);
auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(10);
velox::dwio::common::ExecutorBarrier barrier(executor);
constexpr int kEntryIds = 100;
constexpr int kEntryDuplicates = 10;
Expand Down

0 comments on commit c672cff

Please sign in to comment.