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 2015/07/10 00:30:06 UTC

mesos git commit: Adding some documentation to PID.

Repository: mesos
Updated Branches:
  refs/heads/master dab0977d2 -> 85aa1f043


Adding some documentation to PID.

Review: https://reviews.apache.org/r/35951


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

Branch: refs/heads/master
Commit: 85aa1f0437ad08b460fd51b60e8e510bc3ee9938
Parents: dab0977
Author: Marco Massenzio <ma...@mesosphere.io>
Authored: Thu Jul 9 15:27:03 2015 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Thu Jul 9 15:29:42 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/pid.hpp | 34 +++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/85aa1f04/3rdparty/libprocess/include/process/pid.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/pid.hpp b/3rdparty/libprocess/include/process/pid.hpp
index 1034f85..3bce0bc 100644
--- a/3rdparty/libprocess/include/process/pid.hpp
+++ b/3rdparty/libprocess/include/process/pid.hpp
@@ -30,7 +30,13 @@ namespace process {
 // Forward declaration to break cyclic dependencies.
 class ProcessBase;
 
-
+/**
+ * An "untyped" `PID`, used to encapsulate the process ID for
+ * lower-layer abstractions (eg, when receiving incoming requests)
+ * in the dispatching mechanism.
+ *
+ * @see process::PID
+ */
 struct UPID
 {
   UPID() = default;
@@ -92,6 +98,32 @@ struct UPID
 };
 
 
+/**
+ * A "process identifier" used to uniquely identify a process when
+ * dispatching messages.
+ *
+ * Typed with the actual process class's type, which must be
+ * derived from `process::ProcessBase`.
+ *
+ * Use it like this:
+ *
+ *    using namespace process;
+ *
+ *    class SimpleProcess : public Process<SimpleProcess>
+ *    {
+ *       // ...
+ *    };
+ *
+ *
+ *    SimpleProcess process;
+ *    PID<SimpleProcess> pid = spawn(process);
+ *
+ *    // ...
+ *
+ *    dispatchpid, &SimpleProcess::method, "argument");
+ *
+ * @see process::ProcessBase
+ */
 template <typename T = ProcessBase>
 struct PID : UPID
 {