Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0726-Fix-spec-for-name-for-supervisor_bridge-st...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0726-Fix-spec-for-name-for-supervisor_bridge-start_link.patch of Package erlang
From d361dc2189557bc37eac97ff4e33c4506b208ce5 Mon Sep 17 00:00:00 2001 From: Tomas Abrahamsson <tomas.abrahamsson@gmail.com> Date: Wed, 10 Nov 2021 10:22:08 +0100 Subject: [PATCH] Fix spec for name for supervisor_bridge:start_link Add the {via, Module, ViaName} that was missing, and correct the Name in {global, Name} to term(). Adjust the documentation accordingly. --- lib/stdlib/doc/src/supervisor_bridge.xml | 8 ++++---- lib/stdlib/src/supervisor_bridge.erl | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/stdlib/doc/src/supervisor_bridge.xml b/lib/stdlib/doc/src/supervisor_bridge.xml index 97d0ae292a..97dac7cc07 100644 --- a/lib/stdlib/doc/src/supervisor_bridge.xml +++ b/lib/stdlib/doc/src/supervisor_bridge.xml @@ -72,16 +72,16 @@ <c><anno>Name</anno></c> using <c>register/2</c>.</p> </item> <item> - <p>If <c><anno>SupBridgeName</anno>={global,<anno>Name</anno>}</c>, + <p>If <c><anno>SupBridgeName</anno>={global,<anno>GlobalName</anno>}</c>, the supervisor bridge is registered globally as - <c><anno>Name</anno></c> using + <c><anno>GlobalName</anno></c> using <seemfa marker="kernel:global#register_name/2"> <c>global:register_name/2</c></seemfa>.</p> </item> <item> <p>If - <c><anno>SupBridgeName</anno>={via,<anno>Module</anno>,<anno>Name</anno>}</c>, - the supervisor bridge is registered as <c><anno>Name</anno></c> + <c><anno>SupBridgeName</anno>={via,<anno>Module</anno>,<anno>ViaName</anno>}</c>, + the supervisor bridge is registered as <c><anno>ViaName</anno></c> using a registry represented by <anno>Module</anno>. The <c>Module</c> callback is to export functions <c>register_name/2</c>, <c>unregister_name/1</c>, and <c>send/2</c>, diff --git a/lib/stdlib/src/supervisor_bridge.erl b/lib/stdlib/src/supervisor_bridge.erl index abbfb404a5..b796af30dc 100644 --- a/lib/stdlib/src/supervisor_bridge.erl +++ b/lib/stdlib/src/supervisor_bridge.erl @@ -64,8 +64,11 @@ start_link(Mod, StartArgs) -> gen_server:start_link(supervisor_bridge, [Mod, StartArgs, self], []). -spec start_link(SupBridgeName, Module, Args) -> Result when - SupBridgeName :: {local, Name} | {global, Name}, + SupBridgeName :: {local, Name} | {global, GlobalName} | + {via, Module, ViaName}, Name :: atom(), + GlobalName :: term(), + ViaName :: term(), Module :: module(), Args :: term(), Result :: {ok, Pid} | ignore | {error, Error}, -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor