aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/global.xml
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-14 12:25:13 +0200
committerBjörn Gustavsson <[email protected]>2012-09-17 14:25:10 +0200
commit9d1203d2ad5904529754e5e889fe37f8d229ad4c (patch)
treef039e3ac4c3ceff371598e0e5762d81631f3d379 /lib/kernel/doc/src/global.xml
parentf2230a865e269c468192fa582b1c44fc60ffd5fc (diff)
downloadotp-9d1203d2ad5904529754e5e889fe37f8d229ad4c.tar.gz
otp-9d1203d2ad5904529754e5e889fe37f8d229ad4c.tar.bz2
otp-9d1203d2ad5904529754e5e889fe37f8d229ad4c.zip
global: Allow "tuple funs" as resolve functions
Commit de7e01c958ff7c9e6da4034a53567a30a4ae5792 removed support for tuple funs. To still allow resolve functions for global:{re_}register_name/3 to be specified as {M,F}, we'll need to translate {M,F} to an external fun. Also update the documentation to mention that the use of {M,F} to specify a resolve function is deprecated, and to add a recommendation to use an external fun.
Diffstat (limited to 'lib/kernel/doc/src/global.xml')
-rw-r--r--lib/kernel/doc/src/global.xml12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/kernel/doc/src/global.xml b/lib/kernel/doc/src/global.xml
index 304a9b1d88..9c50049503 100644
--- a/lib/kernel/doc/src/global.xml
+++ b/lib/kernel/doc/src/global.xml
@@ -163,7 +163,8 @@
<fsummary>Globally register a name for a pid</fsummary>
<type name="method"/>
<type_desc name="method">{<c>Module</c>, <c>Function</c>}
- is also allowed
+ is currently also allowed for backward compatibility, but its use is
+ deprecated
</type_desc>
<desc>
<p>Globally associates the name <c><anno>Name</anno></c> with a pid, that is,
@@ -180,6 +181,15 @@
unregistered. This function is called once for each name
clash.</p>
+ <warning>
+ <p>If you plan to change code without restarting your system,
+ you must use an external fun (<c>fun Module:Function/Arity</c>)
+ as the <c><anno>Resolve</anno></c> function; if you use a
+ local fun you can never replace the code for the module that
+ the fun belongs to.
+ </p>
+ </warning>
+
<p>There are three pre-defined resolve functions:
<c>random_exit_name/3</c>, <c>random_notify_name/3</c>, and
<c>notify_all_name/3</c>. If no <c><anno>Resolve</anno></c> function is