(wangle) s/continuation/callback
[folly.git] / folly / wangle / detail.h
index 8a89c64139a8b02bcc15393ebfad96ae2bf35d19..105ebc3ae388c17d2150f73938bda772c1ff6a3a 100644 (file)
@@ -46,9 +46,9 @@ class FutureObject {
   }
 
   template <typename F>
-  void setContinuation(F func) {
+  void setCallback_(F func) {
     if (continuation_) {
-      throw std::logic_error("setContinuation called twice");
+      throw std::logic_error("setCallback_ called twice");
     }
 
     continuation_ = std::move(func);
@@ -111,7 +111,7 @@ struct VariadicContext {
 template <typename... Ts, typename THead, typename... Fs>
 typename std::enable_if<sizeof...(Fs) == 0, void>::type
 whenAllVariadicHelper(VariadicContext<Ts...> *ctx, THead&& head, Fs&&... tail) {
-  head.setContinuation([ctx](Try<typename THead::value_type>&& t) {
+  head.setCallback_([ctx](Try<typename THead::value_type>&& t) {
     std::get<sizeof...(Ts) - sizeof...(Fs) - 1>(ctx->results) = std::move(t);
     if (++ctx->count == ctx->total) {
       ctx->p.setValue(std::move(ctx->results));
@@ -123,7 +123,7 @@ whenAllVariadicHelper(VariadicContext<Ts...> *ctx, THead&& head, Fs&&... tail) {
 template <typename... Ts, typename THead, typename... Fs>
 typename std::enable_if<sizeof...(Fs) != 0, void>::type
 whenAllVariadicHelper(VariadicContext<Ts...> *ctx, THead&& head, Fs&&... tail) {
-  head.setContinuation([ctx](Try<typename THead::value_type>&& t) {
+  head.setCallback_([ctx](Try<typename THead::value_type>&& t) {
     std::get<sizeof...(Ts) - sizeof...(Fs) - 1>(ctx->results) = std::move(t);
     if (++ctx->count == ctx->total) {
       ctx->p.setValue(std::move(ctx->results));