couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [06/33] rexi commit: updated refs/heads/master to bbf59a2
Date Thu, 28 Aug 2014 12:23:16 GMT
Handle rexi-tagged messages

BugzID: 20204


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/commit/4c994477
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/tree/4c994477
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/diff/4c994477

Branch: refs/heads/master
Commit: 4c994477d67352c5102ed773600089bd1037ab89
Parents: d1995a5
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Thu Jun 6 15:44:05 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Jul 23 17:57:34 2014 +0100

----------------------------------------------------------------------
 src/rexi_utils.erl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rexi/blob/4c994477/src/rexi_utils.erl
----------------------------------------------------------------------
diff --git a/src/rexi_utils.erl b/src/rexi_utils.erl
index ced0ca3..79db48c 100644
--- a/src/rexi_utils.erl
+++ b/src/rexi_utils.erl
@@ -59,6 +59,20 @@ process_message(RefList, Keypos, Fun, Acc0, TimeoutRef, PerMsgTO) ->
     receive
     {timeout, TimeoutRef} ->
         {timeout, Acc0};
+    {rexi, Ref, Msg} ->
+        case lists:keyfind(Ref, Keypos, RefList) of
+        false ->
+            {ok, Acc0};
+        Worker ->
+            Fun(Msg, Worker, Acc0)
+        end;
+    {rexi, Ref, From, Msg} ->
+        case lists:keyfind(Ref, Keypos, RefList) of
+        false ->
+            {ok, Acc0};
+        Worker ->
+            Fun(Msg, {Worker, From}, Acc0)
+        end;
     {Ref, Msg} ->
         case lists:keyfind(Ref, Keypos, RefList) of
         false ->


Mime
View raw message