Commit dec61fcb authored by Igor Sugak's avatar Igor Sugak Committed by Facebook Github Bot

default initialize Synchronized test data

Reviewed By: yfeldblum

Differential Revision: D19357723

fbshipit-source-id: d099419271f74b013a276079723250ce842e2b24
parent 087f5273
...@@ -653,7 +653,7 @@ void testDualLockingWithConst() { ...@@ -653,7 +653,7 @@ void testDualLockingWithConst() {
template <class Mutex> template <class Mutex>
void testTimed() { void testTimed() {
folly::Synchronized<std::vector<int>, Mutex> v; folly::Synchronized<std::vector<int>, Mutex> v;
folly::Synchronized<uint64_t, Mutex> numTimeouts; folly::Synchronized<uint64_t, Mutex> numTimeouts{0};
auto worker = [&](size_t threadIdx) { auto worker = [&](size_t threadIdx) {
// Test directly using operator-> on the lock result // Test directly using operator-> on the lock result
...@@ -711,7 +711,7 @@ void testTimed() { ...@@ -711,7 +711,7 @@ void testTimed() {
template <class Mutex> template <class Mutex>
void testTimedShared() { void testTimedShared() {
folly::Synchronized<std::vector<int>, Mutex> v; folly::Synchronized<std::vector<int>, Mutex> v;
folly::Synchronized<uint64_t, Mutex> numTimeouts; folly::Synchronized<uint64_t, Mutex> numTimeouts{0};
auto worker = [&](size_t threadIdx) { auto worker = [&](size_t threadIdx) {
// Test directly using operator-> on the lock result // Test directly using operator-> on the lock result
...@@ -764,7 +764,7 @@ void testTimedShared() { ...@@ -764,7 +764,7 @@ void testTimedShared() {
template <class Mutex> template <class Mutex>
void testTimedSynchronized() { void testTimedSynchronized() {
folly::Synchronized<std::vector<int>, Mutex> v; folly::Synchronized<std::vector<int>, Mutex> v;
folly::Synchronized<uint64_t, Mutex> numTimeouts; folly::Synchronized<uint64_t, Mutex> numTimeouts{0};
auto worker = [&](size_t threadIdx) { auto worker = [&](size_t threadIdx) {
// Test contextualLock() // Test contextualLock()
...@@ -811,7 +811,7 @@ void testTimedSynchronized() { ...@@ -811,7 +811,7 @@ void testTimedSynchronized() {
template <class Mutex> template <class Mutex>
void testTimedSynchronizedWithConst() { void testTimedSynchronizedWithConst() {
folly::Synchronized<std::vector<int>, Mutex> v; folly::Synchronized<std::vector<int>, Mutex> v;
folly::Synchronized<uint64_t, Mutex> numTimeouts; folly::Synchronized<uint64_t, Mutex> numTimeouts{0};
auto worker = [&](size_t threadIdx) { auto worker = [&](size_t threadIdx) {
// Test contextualLock() // Test contextualLock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment