(wangle) s/continuation_/callback/ (missed some)
authorHans Fugal <fugalh@fb.com>
Mon, 30 Jun 2014 20:32:17 +0000 (13:32 -0700)
committerTudor Bosman <tudorb@fb.com>
Mon, 7 Jul 2014 15:42:06 +0000 (08:42 -0700)
Summary: In the spirit of D1406753

Test Plan: still builds and tests pass

Reviewed By: hannesr@fb.com

Subscribers: jsedgwick, net-systems@, fugalh, exa

FB internal diff: D1412002

folly/wangle/detail/State.h

index ccba9acd9c0dd198e75aa540f72070874cef35ac..b971a18897afbbe7d94a2ec3c5751503753a8faf 100644 (file)
@@ -48,14 +48,14 @@ class State {
 
   template <typename F>
   void setCallback_(F func) {
-    if (continuation_) {
+    if (callback_) {
       throw std::logic_error("setCallback_ called twice");
     }
 
-    continuation_ = std::move(func);
+    callback_ = std::move(func);
 
     if (shouldContinue_.test_and_set()) {
-      continuation_(std::move(*value_));
+      callback_(std::move(*value_));
       delete this;
     }
   }
@@ -68,7 +68,7 @@ class State {
     value_ = std::move(t);
 
     if (shouldContinue_.test_and_set()) {
-      continuation_(std::move(*value_));
+      callback_(std::move(*value_));
       delete this;
     }
   }
@@ -96,7 +96,7 @@ class State {
  private:
   std::atomic_flag shouldContinue_ = ATOMIC_FLAG_INIT;
   folly::Optional<Try<T>> value_;
-  std::function<void(Try<T>&&)> continuation_;
+  std::function<void(Try<T>&&)> callback_;
 };
 
 template <typename... Ts>