Skip to content

Commit 3f281d6

Browse files
generatedunixname1587093422349604meta-codesync[bot]
authored andcommitted
Fix CQS signal modernize-use-emplace in fbcode/mcrouter/lib
Differential Revision: D96109484 fbshipit-source-id: c686048cc241ea81490297738f73620d663e4683
1 parent 0371e9d commit 3f281d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

third-party/mcrouter/src/mcrouter/lib/fbi/test/sem_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ TEST(counting_semaphore, basic) {
5353

5454
std::vector<std::thread> threads;
5555
for (int i = 0; i < Y; ++i) {
56-
threads.push_back(std::thread{&consume, i, X});
56+
threads.emplace_back(&consume, i, X);
5757
}
5858
for (int i = 0; i < X; ++i) {
59-
threads.push_back(std::thread{&produce, i, Y});
59+
threads.emplace_back(&produce, i, Y);
6060
}
6161

6262
for (auto& t : threads) {
@@ -77,10 +77,10 @@ TEST(counting_semaphore, nonblocking) {
7777

7878
std::vector<std::thread> threads;
7979
for (int i = 0; i < X; ++i) {
80-
threads.push_back(std::thread{&produce, i, Y});
80+
threads.emplace_back(&produce, i, Y);
8181
}
8282
for (int i = 0; i < Y; ++i) {
83-
threads.push_back(std::thread{&consume_nonblocking, i, X});
83+
threads.emplace_back(&consume_nonblocking, i, X);
8484
}
8585

8686
for (auto& t : threads) {

0 commit comments

Comments
 (0)