From: Dave Watson Date: Wed, 7 Jan 2015 22:55:17 +0000 (-0800) Subject: Fix CPUObserver test X-Git-Tag: v0.22.0~32 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5227dcf2ad201b405b767e58b013952198d822d7;p=folly.git 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 --- 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) {