Skip to content

Commit

Permalink
refactor: Use KeepAlive instead of Executor*" (#112)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #112

X-link: facebookincubator/velox#11785

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

Original PR: facebookincubator/velox#11732

Reviewed By: xiaoxmeng

Differential Revision: D66911053

fbshipit-source-id: fefb086276f3fd442760774d08ac31de9063ab60
pedroerp authored and facebook-github-bot committed Dec 10, 2024
1 parent 5955884 commit cc6724a
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
@@ -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}) {
@@ -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;
@@ -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;
@@ -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;
@@ -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;

0 comments on commit cc6724a

Please sign in to comment.