File 0187-kernel-Improve-docs-of-rpc-multicall-5.patch of Package erlang

From 4baa7361afa5b10e46bf1438e560dc4b33f5b248 Mon Sep 17 00:00:00 2001
From: Hans Bolinder <hasse@erlang.org>
Date: Tue, 27 Feb 2018 13:35:25 +0100
Subject: [PATCH] kernel: Improve docs of rpc:multicall/5

---
 lib/kernel/doc/src/rpc.xml | 11 ++++++-----
 lib/kernel/src/rpc.erl     | 10 +++++-----
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/kernel/doc/src/rpc.xml b/lib/kernel/doc/src/rpc.xml
index adec2d9520..fab616e630 100644
--- a/lib/kernel/doc/src/rpc.xml
+++ b/lib/kernel/doc/src/rpc.xml
@@ -4,7 +4,7 @@
 <erlref>
   <header>
     <copyright>
-      <year>1996</year><year>2013</year>
+      <year>1996</year><year>2018</year>
       <holder>Ericsson AB. All Rights Reserved.</holder>
     </copyright>
     <legalnotice>
@@ -174,8 +174,9 @@
         <p>The function evaluates <c>apply(<anno>Module</anno>, <anno>Function</anno>, <anno>Args</anno>)</c>
           on the specified nodes and collects the answers. It returns 
           <c>{<anno>ResL</anno>, <anno>BadNodes</anno>}</c>, where <c><anno>BadNodes</anno></c> is a list
-          of the nodes that terminated or timed out during computation,
-          and <c><anno>ResL</anno></c> is a list of the return values.
+          of the nodes that do not exist,
+          and <c><anno>ResL</anno></c> is a list of the return values,
+          or <c>{badrpc, <anno>Reason</anno>}</c> for failing calls.
           <c><anno>Timeout</anno></c> is a time (integer) in milliseconds, or
           <c>infinity</c>.</p>
         <p>The following example is useful when new object code is to
@@ -323,7 +324,7 @@
     </func>
     <func>
       <name name="pmap" arity="3"/>
-      <fsummary>Parallell evaluation of mapping a function over a list </fsummary>
+      <fsummary>Parallel evaluation of mapping a function over a list </fsummary>
       <desc>
         <p>Evaluates <c>apply(<anno>Module</anno>, <anno>Function</anno>, [<anno>Elem</anno>|<anno>ExtraArgs</anno>])</c>,
           for every element <c><anno>Elem</anno></c> in <c><anno>List1</anno></c>, in parallel.
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl
index 0e0b7dffa3..b04aa9030b 100644
--- a/lib/kernel/src/rpc.erl
+++ b/lib/kernel/src/rpc.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %%
-%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2018. All Rights Reserved.
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -507,7 +507,7 @@ start_monitor(Node, Name) ->
       Module :: module(),
       Function :: atom(),
       Args :: [term()],
-      ResL :: [term()],
+      ResL :: [Res :: term() | {'badrpc', Reason :: term()}],
       BadNodes :: [node()].
 
 multicall(M, F, A) -> 
@@ -518,14 +518,14 @@ multicall(M, F, A) ->
                   Module :: module(),
                   Function :: atom(),
                   Args :: [term()],
-                  ResL :: [term()],
+                  ResL :: [Res :: term() | {'badrpc', Reason :: term()}],
                   BadNodes :: [node()];
                (Module, Function, Args, Timeout) -> {ResL, BadNodes} when
                   Module :: module(),
                   Function :: atom(),
                   Args :: [term()],
                   Timeout :: timeout(),
-                  ResL :: [term()],
+                  ResL :: [Res :: term() | {'badrpc', Reason :: term()}],
                   BadNodes :: [node()].
 
 multicall(Nodes, M, F, A) when is_list(Nodes) ->
@@ -540,7 +540,7 @@ multicall(M, F, A, Timeout) ->
       Function :: atom(),
       Args :: [term()],
       Timeout :: timeout(),
-      ResL :: [term()],
+      ResL :: [Res :: term() | {'badrpc', Reason :: term()}],
       BadNodes :: [node()].
 
 multicall(Nodes, M, F, A, infinity)
-- 
2.16.2

openSUSE Build Service is sponsored by