Remove template helper constants
[folly.git] / folly / fibers / SimpleLoopController.h
index 8c728bd6e5dd0c70bbbd6e09b2c22e11455f0f9c..c41fb180f511d008885e77cb58e1371e479a6e6f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,8 @@ class SimpleLoopController : public LoopController {
 
       if (scheduled_) {
         scheduled_ = false;
-        waiting = fm_->loopUntilNoReady();
+        runLoop();
+        waiting = fm_->hasTasks();
       }
     }
   }
@@ -70,6 +71,10 @@ class SimpleLoopController : public LoopController {
     return remoteScheduleCalled_;
   }
 
+  void runLoop() override {
+    fm_->loopUntilNoReadyImpl();
+  }
+
   void schedule() override {
     scheduled_ = true;
   }
@@ -104,5 +109,5 @@ class SimpleLoopController : public LoopController {
 
   friend class FiberManager;
 };
-}
-} // folly::fibers
+} // namespace fibers
+} // namespace folly