diff options
Diffstat (limited to 'src/fabric_util.erl')
-rw-r--r-- | src/fabric_util.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fabric_util.erl b/src/fabric_util.erl index 760e511c..f0ab213d 100644 --- a/src/fabric_util.erl +++ b/src/fabric_util.erl @@ -1,6 +1,6 @@ -module(fabric_util). --export([submit_jobs/3, recv/4, receive_loop/4, receive_loop/6]). +-export([submit_jobs/3, cleanup/1, recv/4, receive_loop/4, receive_loop/6]). -include("fabric.hrl"). @@ -11,6 +11,9 @@ submit_jobs(Shards, EndPoint, ExtraArgs) -> Shard#shard{ref = Ref} end, Shards). +cleanup(Workers) -> + [rexi:kill(Node, Ref) || #shard{node=Node, ref=Ref} <- Workers]. + recv(Workers, Keypos, Fun, Acc0) -> receive_loop(Workers, Keypos, Fun, Acc0). |