Drop FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR
authorChristopher Dykes <cdykes@fb.com>
Sun, 26 Feb 2017 19:13:26 +0000 (11:13 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 26 Feb 2017 19:20:27 +0000 (11:20 -0800)
Summary: It was only needed for GCC 4.7 support. GCC 4.8 and above support it.

Reviewed By: yfeldblum

Differential Revision: D4616044

fbshipit-source-id: 177d7b3b7090134f9d8084a3ba7a984446c87d5e

folly/configure.ac
folly/test/ThreadLocalTest.cpp

index c73da686e20b72b212adcdfdc81a99a721831d84..623bfdaea8554173d80e7a28947fe9aa2008c0aa 100644 (file)
@@ -252,22 +252,6 @@ AC_DEFINE_UNQUOTED(
   [OVERRIDE], [$override_val],
   [Define to "override" if the compiler supports C++11 "override"])
 
-AC_CACHE_CHECK(
-  [for std::this_thread::sleep_for],
-  [folly_cv_func_this_thread_sleep_for],
-  [AC_COMPILE_IFELSE(
-    [AC_LANG_SOURCE[
-      #include <thread>
-      #include <chrono>
-      void func() { std::this_thread::sleep_for(std::chrono::seconds(1)); }]],
-    [folly_cv_func_this_thread_sleep_for=yes],
-    [folly_cv_func_this_thread_sleep_for=no])])
-
-if test "$folly_cv_func_this_thread_sleep_for" = yes; then
-    AC_DEFINE([HAVE_STD__THIS_THREAD__SLEEP_FOR], [1],
-              [Define to 1 if std::this_thread::sleep_for() is defined.])
-fi
-
 AC_CACHE_CHECK(
   [for constexpr strlen],
   [folly_cv_func_constexpr_strlen],
index 52fef3f8d172d1336c9579ce035211f9f9be3673..c33549d0cb253856517076ae59726d1f8facaf12 100644 (file)
@@ -415,7 +415,6 @@ class FillObject {
 
 }  // namespace
 
-#if FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR
 TEST(ThreadLocal, Stress) {
   static constexpr size_t numFillObjects = 250;
   std::array<ThreadLocalPtr<FillObject>, numFillObjects> objects;
@@ -446,7 +445,6 @@ TEST(ThreadLocal, Stress) {
 
   EXPECT_EQ(numFillObjects * numThreads * numReps, gDestroyed);
 }
-#endif
 
 // Yes, threads and fork don't mix
 // (http://cppwisdom.quora.com/Why-threads-and-fork-dont-mix) but if you're