File 0754-erts-Add-signal-delivery-guarantee-to-monitor_node.patch of Package erlang

From 7565d38e728e70b72971ffb84c7635d0cf247350 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Tue, 18 May 2021 14:57:56 +0200
Subject: [PATCH 4/6] erts: Add signal delivery guarantee to monitor_node

The guarantee is that there is no guarantee. The current
implementation inserts the node monitor in the general
tree of monitors, so it will be sent somewhere along with
all of the other process monitors.
---
 erts/doc/src/erlang.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index e522bec297..85c80dfef2 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -4060,6 +4060,12 @@ receive_replies(ReqId, N, Acc) ->
           are delivered to the process. If there is no connection to
           <c><anno>Node</anno></c>, an attempt is made to create one.
           If this fails, a <c>nodedown</c> message is delivered.</p>
+        <p>The delivery of the <c>nodedown</c> signal is not ordered towards other
+          link or monitor signals from the node that goes down. If you need a
+          guarantee that all signals from the remote node has been delivered before
+          the <c>nodedown</c> signal is sent, you should use
+          <seealso marker="kernel:net_kernel#monitor_nodes/1">
+            <c>net_kernel:monitor_nodes/1</c></seealso>.</p>
         <p>Nodes connected through hidden connections can be monitored
           as any other nodes.</p>
         <p>Failure: <c>badarg</c> if the local node is not alive.</p>
-- 
2.26.2

openSUSE Build Service is sponsored by