replace std::dequeue with UMPMCQueue in UnboundedBlockingQueue
[folly.git] / folly / detail / MemoryIdler.h
index c7a35297be2796da51f266d6c904c55e5bca17b5..1cabfecc558eea838d8873769b7378df3cb9f2b0 100644 (file)
 #include <chrono>
 
 #include <folly/AtomicStruct.h>
-#include <folly/Hash.h>
-#include <folly/ThreadId.h>
 #include <folly/Traits.h>
 #include <folly/detail/Futex.h>
+#include <folly/hash/Hash.h>
+#include <folly/system/ThreadId.h>
 
 namespace folly {
 
@@ -33,7 +33,7 @@ template <>
 struct IsTriviallyCopyable<std::chrono::steady_clock::duration>
   : std::true_type {};
 
-}
+} // namespace folly
 
 namespace folly { namespace detail {
 
@@ -110,14 +110,15 @@ struct MemoryIdler {
   /// (1 + timeoutVariationFraction), to smooth out the behavior in a
   /// system with bursty requests.  The default is to wait up to 50%
   /// extra, so on average 25% extra
-  template <template <typename> class Atom,
-            typename Clock = std::chrono::steady_clock>
+  template <
+      template <typename> class Atom,
+      typename Clock = std::chrono::steady_clock>
   static bool futexWait(
       Futex<Atom>& fut,
       uint32_t expected,
       uint32_t waitMask = -1,
-      typename Clock::duration idleTimeout
-          defaultIdleTimeout.load(std::memory_order_acquire),
+      typename Clock::duration idleTimeout =
+          defaultIdleTimeout.load(std::memory_order_acquire),
       size_t stackToRetain = kDefaultStackToRetain,
       float timeoutVariationFrac = 0.5) {
 
@@ -149,4 +150,5 @@ struct MemoryIdler {
   }
 };
 
-}} // namespace folly::detail
+} // namespace detail
+} // namespace folly