Fix joining threads twice when exiting EventBaseTest.RunInThread normally
authorZonr Chang <zonr.net@gmail.com>
Tue, 30 Aug 2016 22:46:50 +0000 (15:46 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Tue, 30 Aug 2016 22:53:29 +0000 (15:53 -0700)
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

index 11f61187fa74cd8919798c8a4ea8a7e746fe1b02..06deeebd18af485f5717baf9c16d59e89be6bea4 100644 (file)
@@ -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