You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/01/28 02:16:18 UTC

git commit: Changed catchup.cpp to make it compilable with clang and C++11.

Updated Branches:
  refs/heads/master b609c8514 -> 49b473083


Changed catchup.cpp to make it compilable with clang and C++11.

From: Jie Yu <yu...@gmail.com>
Review: https://reviews.apache.org/r/17435


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/49b47308
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/49b47308
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/49b47308

Branch: refs/heads/master
Commit: 49b4730832f87d9901f729cec2bcf440db5072e7
Parents: b609c85
Author: Benjamin Hindman <be...@gmail.com>
Authored: Mon Jan 27 17:15:59 2014 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Mon Jan 27 17:15:59 2014 -0800

----------------------------------------------------------------------
 src/log/catchup.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/49b47308/src/log/catchup.cpp
----------------------------------------------------------------------
diff --git a/src/log/catchup.cpp b/src/log/catchup.cpp
index 69fac3c..4ee32f2 100644
--- a/src/log/catchup.cpp
+++ b/src/log/catchup.cpp
@@ -207,6 +207,11 @@ protected:
   }
 
 private:
+  static void timedout(Future<uint64_t> catching)
+  {
+    catching.discard();
+  }
+
   void catchup()
   {
     if (it == positions.end()) {
@@ -222,7 +227,7 @@ private:
       .onFailed(defer(self(), &Self::failed))
       .onReady(defer(self(), &Self::succeeded));
 
-    Timer::create(timeout, lambda::bind(&Future<uint64_t>::discard, catching));
+    Timer::create(timeout, lambda::bind(&Self::timedout, catching));
   }
 
   void discarded()