You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/08/07 20:40:59 UTC
[mesos] branch master updated: Captured lambda variables by
reference in queue benchmarks.
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 53b3901 Captured lambda variables by reference in queue benchmarks.
53b3901 is described below
commit 53b39012ba8c05a65858f1298ffb93cf6944dbd1
Author: James Peach <jp...@apache.org>
AuthorDate: Tue Aug 7 13:36:15 2018 -0700
Captured lambda variables by reference in queue benchmarks.
Clang warns if you capture a const by reference, and Visual Studio
warns if you don't. Split the difference and use an implicit default
reference capture.
---
3rdparty/libprocess/src/tests/benchmarks.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/3rdparty/libprocess/src/tests/benchmarks.cpp b/3rdparty/libprocess/src/tests/benchmarks.cpp
index 16b3bca..b18b8e9 100644
--- a/3rdparty/libprocess/src/tests/benchmarks.cpp
+++ b/3rdparty/libprocess/src/tests/benchmarks.cpp
@@ -875,7 +875,7 @@ TEST(ProcessTest, Process_BENCHMARK_MpscLinkedQueueNonContendedRead)
std::vector<std::thread> producers;
for (unsigned int t = 0; t < producerCount; t++) {
- producers.push_back(std::thread([s, &q]() {
+ producers.push_back(std::thread([&]() {
for (int i = 0; i < messageCount; i++) {
q.enqueue(s);
}