From: Michal 'vorner' Vaner Date: Mon, 1 Oct 2012 14:20:33 +0000 (+0200) Subject: [2202] The vector must be a reference X-Git-Tag: trac2402_base~79^2~5^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ca39bfe35f856eb54ff77c50f5b2230ed20313b;p=thirdparty%2Fkea.git [2202] The vector must be a reference Otherwise, each thread would get its own copy of it, messing with it privately, not causing any need for locking. --- diff --git a/src/lib/util/threads/tests/lock_unittest.cc b/src/lib/util/threads/tests/lock_unittest.cc index cc959f5433..d6579d8e91 100644 --- a/src/lib/util/threads/tests/lock_unittest.cc +++ b/src/lib/util/threads/tests/lock_unittest.cc @@ -79,7 +79,7 @@ const unsigned long long length = 1000; const unsigned long long iterations = 10000; const unsigned long long value = 2000; void -performStrangeOperation(std::vector array, int direction, +performStrangeOperation(std::vector& array, int direction, Mutex* mutex) { unsigned long long position = 0;