Option to record precise stack on every N fiber
[folly.git] / folly / experimental / fibers / Fiber.h
index df9668d64e1665fa74ad8403b36db5bca725bf3c..6ab48af4840cb8736f584d030be1ab1d6a8a88a6 100644 (file)
@@ -68,6 +68,7 @@ class Fiber {
   friend class FiberManager;
 
   explicit Fiber(FiberManager& fiberManager);
+  void init(bool recordStackUsed);
 
   template <typename F>
   void setFunction(F&& func);
@@ -98,6 +99,8 @@ class Fiber {
   FContext fcontext_;           /**< current task execution context */
   intptr_t data_;               /**< Used to keep some data with the Fiber */
   std::function<void()> func_;  /**< task function */
+  bool recordStackUsed_{false};
+  bool stackFilledWithMagic_{false};
 
   /**
    * Points to next fiber in remote ready list