[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],
} // namespace
-#if FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR
TEST(ThreadLocal, Stress) {
static constexpr size_t numFillObjects = 250;
std::array<ThreadLocalPtr<FillObject>, numFillObjects> objects;
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