From 5227dcf2ad201b405b767e58b013952198d822d7 Mon Sep 17 00:00:00 2001 From: Dave Watson Date: Wed, 7 Jan 2015 14:55:17 -0800 Subject: [PATCH] Fix CPUObserver test Summary: CPUObserver observe events happen in different threads than the IOThreadPool ones. Test Plan: fbconfig folly/wangle/concurrent/test && fbmake runtests --stress-runs 48 Reviewed By: jsedgwick@fb.com Subscribers: doug, fugalh, folly-diffs@ FB internal diff: D1769345 Tasks: 5948465 Signature: t1:1769345:1420654316:196121ca30c905497a0acade05b9d877c98f6eeb --- folly/wangle/concurrent/test/ThreadPoolExecutorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/wangle/concurrent/test/ThreadPoolExecutorTest.cpp b/folly/wangle/concurrent/test/ThreadPoolExecutorTest.cpp index 385d2b0e..b83dce28 100644 --- a/folly/wangle/concurrent/test/ThreadPoolExecutorTest.cpp +++ b/folly/wangle/concurrent/test/ThreadPoolExecutorTest.cpp @@ -337,7 +337,7 @@ class TestObserver : public ThreadPoolExecutor::Observer { ASSERT_EQ(threads_, 0); } private: - int threads_{0}; + std::atomic threads_{0}; }; TEST(ThreadPoolExecutorTest, IOObserver) { -- 2.34.1