From 9b75144718da8f899feb46bb8236d0538de483dd Mon Sep 17 00:00:00 2001 From: Zonr Chang Date: Tue, 30 Aug 2016 15:46:50 -0700 Subject: [PATCH] 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 --- folly/io/async/test/EventBaseTest.cpp | 5 ----- 1 file changed, 5 deletions(-) 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 -- 2.34.1