From: Zonr Chang Date: Tue, 30 Aug 2016 22:46:50 +0000 (-0700) Subject: Fix joining threads twice when exiting EventBaseTest.RunInThread normally X-Git-Tag: v2016.09.05.00~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b75144718da8f899feb46bb8236d0538de483dd;p=folly.git Fix joining threads twice when exiting EventBaseTest.RunInThread normally Summary: 10e9cd3 set up SCOPE_EXIT to join threads (wait for them to exit) on exceptions. However, it is also called on normal exit. Remove the original code at the end for joining threads. This fixes EventBaseTest regression. Closes https://github.com/facebook/folly/pull/468 Reviewed By: yfeldblum Differential Revision: D3792977 Pulled By: Orvid fbshipit-source-id: e4b12202ae3e35fd942ad2ca1d8d405cf1a28f68 --- diff --git a/folly/io/async/test/EventBaseTest.cpp b/folly/io/async/test/EventBaseTest.cpp index 11f61187..06deeebd 100644 --- a/folly/io/async/test/EventBaseTest.cpp +++ b/folly/io/async/test/EventBaseTest.cpp @@ -1176,11 +1176,6 @@ TEST(EventBaseTest, RunInThread) { for (uint32_t n = 0; n < numThreads; ++n) { ASSERT_EQ(expectedValues[n], opsPerThread); } - - // Wait on all of the threads. - for (auto& thread: threads) { - thread.join(); - } } // This test simulates some calls, and verifies that the waiting happens by