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 2011/06/05 07:41:26 UTC

svn commit: r1131857 - in /incubator/mesos/trunk/src/third_party/libprocess: reliable.cpp reliable.hpp

Author: benh
Date: Sun Jun  5 05:41:25 2011
New Revision: 1131857

URL: http://svn.apache.org/viewvc?rev=1131857&view=rev
Log:
Factored out reliable timeout from the implementation of ReliableProcess to use in testing.

Modified:
    incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp
    incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp

Modified: incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp?rev=1131857&r1=1131856&r2=1131857&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp Sun Jun  5 05:41:25 2011
@@ -18,8 +18,6 @@ using std::map;
        fatalerror("realloc"); tmp;                                  \
    })
 
-#define TIMEOUT 10
-
 
 /*
  * TODO(benh): Don't send structs around, this is horribly
@@ -56,7 +54,7 @@ protected:
       send(rmsg->msg.to, RELIABLE_MSG, (char *) rmsg,
 	   sizeof(struct rmsg) + rmsg->msg.len);
 
-      switch (receive(TIMEOUT)) {
+      switch (receive(RELIABLE_TIMEOUT)) {
 	case RELIABLE_ACK: {
 	  // All done!
 	  return;

Modified: incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp?rev=1131857&r1=1131856&r2=1131857&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp Sun Jun  5 05:41:25 2011
@@ -5,6 +5,8 @@
 
 #include <map>
 
+#define RELIABLE_TIMEOUT 10
+
 
 enum {
   RELIABLE_MSG = PROCESS_MSGID,