File 0179-Use-priority-monitors-in-global.patch of Package erlang

From 3c70521fb4755889d5529669596b3c292e42e481 Mon Sep 17 00:00:00 2001
From: Maria Scott <maria-12648430@hnc-agency.org>
Date: Tue, 28 Oct 2025 13:22:17 +0100
Subject: [PATCH] Use priority monitors in global

---
 lib/kernel/src/global.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/kernel/src/global.erl b/lib/kernel/src/global.erl
index d0d53dc910..c157ce427a 100644
--- a/lib/kernel/src/global.erl
+++ b/lib/kernel/src/global.erl
@@ -2108,7 +2108,7 @@ can_set_lock({ResourceId, LockRequesterId}) ->
     end.
 
 insert_lock({ResourceId, LockRequesterId}=Id, Pid, PidRefs, S) ->
-    Ref = erlang:monitor(process, Pid),
+    Ref = erlang:monitor(process, Pid, [priority]),
     save_node_resource_info(node(Pid), Ref),
     true = ets:insert(global_pid_ids, {Pid, ResourceId}),
     true = ets:insert(global_pid_ids, {Ref, ResourceId}),
@@ -2226,7 +2226,7 @@ sync_other(Node, N) ->
     % exit(normal).
 
 insert_global_name(Name, Pid, Method, FromPidOrNode, ExtraInfo, S) ->
-    Ref = erlang:monitor(process, Pid),
+    Ref = erlang:monitor(process, Pid, [priority]),
     save_node_resource_info(node(Pid), Ref),
     true = ets:insert(global_names, {Name, Pid, Method, Ref}),
     true = ets:insert(global_pid_names, {Pid, Name}),
-- 
2.51.0

openSUSE Build Service is sponsored by