Browse Source

re-generate docs

Ulf Wiger 9 years ago
parent
commit
133924157d
14 changed files with 153 additions and 612 deletions
  1. 2 1
      README.md
  2. 2 1
      doc/README.md
  3. 89 306
      doc/gproc.md
  4. 1 3
      doc/gproc_app.md
  5. 2 10
      doc/gproc_bcast.md
  6. 6 43
      doc/gproc_dist.md
  7. 1 2
      doc/gproc_info.md
  8. 0 5
      doc/gproc_init.md
  9. 3 32
      doc/gproc_lib.md
  10. 4 14
      doc/gproc_monitor.md
  11. 23 96
      doc/gproc_pool.md
  12. 16 89
      doc/gproc_ps.md
  13. 2 9
      doc/gproc_pt.md
  14. 2 1
      doc/gproc_sup.md

+ 2 - 1
README.md

@@ -97,9 +97,9 @@ global gproc.
 
 
 ## Building Edoc ##
 ## Building Edoc ##
 
 
-
 By default, `./rebar doc` generates Github-flavored Markdown files.
 By default, `./rebar doc` generates Github-flavored Markdown files.
 If you want to change this, remove the `edoc_opts` line from `rebar.config`.
 If you want to change this, remove the `edoc_opts` line from `rebar.config`.
+
 Gproc was first introduced at the ACM SIGPLAN Erlang Workshop in
 Gproc was first introduced at the ACM SIGPLAN Erlang Workshop in
 Freiburg 2007 ([Paper available here](http://github.com/uwiger/gproc/blob/master/doc/erlang07-wiger.pdf)).
 Freiburg 2007 ([Paper available here](http://github.com/uwiger/gproc/blob/master/doc/erlang07-wiger.pdf)).
 
 
@@ -120,3 +120,4 @@ Freiburg 2007 ([Paper available here](http://github.com/uwiger/gproc/blob/master
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_ps.md" class="module">gproc_ps</a></td></tr>
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_ps.md" class="module">gproc_ps</a></td></tr>
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_pt.md" class="module">gproc_pt</a></td></tr>
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_pt.md" class="module">gproc_pt</a></td></tr>
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_sup.md" class="module">gproc_sup</a></td></tr></table>
 <tr><td><a href="http://github.com/uwiger/gproc/blob/master/doc/gproc_sup.md" class="module">gproc_sup</a></td></tr></table>
+

+ 2 - 1
doc/README.md

@@ -7,6 +7,7 @@ __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)), Joseph Wayne N
 Extended process dictionary
 Extended process dictionary
 
 
 [![Build Status](https://travis-ci.org/uwiger/gproc.png?branch=master)](https://travis-ci.org/uwiger/gproc)
 [![Build Status](https://travis-ci.org/uwiger/gproc.png?branch=master)](https://travis-ci.org/uwiger/gproc)
+[![Hex pm](http://img.shields.io/hexpm/v/gproc.svg?style=flat)](https://hex.pm/packages/gproc)
 
 
 
 
 ## Note ##
 ## Note ##
@@ -96,9 +97,9 @@ global gproc.
 
 
 ## Building Edoc ##
 ## Building Edoc ##
 
 
-
 By default, `./rebar doc` generates Github-flavored Markdown files.
 By default, `./rebar doc` generates Github-flavored Markdown files.
 If you want to change this, remove the `edoc_opts` line from `rebar.config`.
 If you want to change this, remove the `edoc_opts` line from `rebar.config`.
+
 Gproc was first introduced at the ACM SIGPLAN Erlang Workshop in
 Gproc was first introduced at the ACM SIGPLAN Erlang Workshop in
 Freiburg 2007 ([Paper available here](erlang07-wiger.pdf)).
 Freiburg 2007 ([Paper available here](erlang07-wiger.pdf)).
 
 

+ 89 - 306
doc/gproc.md

@@ -6,40 +6,32 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Extended process registry
 Extended process registry
 This module implements an extended process registry.
 This module implements an extended process registry.
+
 __Behaviours:__ [`gen_server`](gen_server.md).
 __Behaviours:__ [`gen_server`](gen_server.md).
 
 
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
-
-
 For a detailed description, see
 For a detailed description, see
 [erlang07-wiger.pdf](erlang07-wiger.pdf).
 [erlang07-wiger.pdf](erlang07-wiger.pdf).
 
 
-
-
 __NOTE:__ The functions in the Gproc API expect the Gproc application
 __NOTE:__ The functions in the Gproc API expect the Gproc application
 to be running.
 to be running.
 
 
 
 
-
-
 ## Tuning Gproc performance ##
 ## Tuning Gproc performance ##
 
 
-
-
 Gproc relies on a central server and an ordered-set ets table.
 Gproc relies on a central server and an ordered-set ets table.
 Effort is made to perform as much work as possible in the client without
 Effort is made to perform as much work as possible in the client without
 sacrificing consistency. A few things can be tuned by setting the following
 sacrificing consistency. A few things can be tuned by setting the following
 application environment variables in the top application of `gproc`
 application environment variables in the top application of `gproc`
 (usually `gproc`):
 (usually `gproc`):
 
 
-
 * `{ets_options, list()}` - Currently, the options `{write_concurrency, F}`
 * `{ets_options, list()}` - Currently, the options `{write_concurrency, F}`
 and `{read_concurrency, F}` are allowed. The default is
 and `{read_concurrency, F}` are allowed. The default is
 `[{write_concurrency, true}, {read_concurrency, true}]`
 `[{write_concurrency, true}, {read_concurrency, true}]`
@@ -58,7 +50,6 @@ will improve performance.
 ### <a name="type-context">context()</a> ###
 ### <a name="type-context">context()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()</a>} | <a href="#type-type">type()</a>
 context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()</a>} | <a href="#type-type">type()</a>
 </code></pre>
 </code></pre>
@@ -66,11 +57,9 @@ context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()</a>}
 
 
 
 
 
 
-
 ### <a name="type-ctr_incr">ctr_incr()</a> ###
 ### <a name="type-ctr_incr">ctr_incr()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 ctr_incr() = integer()
 ctr_incr() = integer()
 </code></pre>
 </code></pre>
@@ -78,11 +67,9 @@ ctr_incr() = integer()
 
 
 
 
 
 
-
 ### <a name="type-ctr_setval">ctr_setval()</a> ###
 ### <a name="type-ctr_setval">ctr_setval()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 ctr_setval() = integer()
 ctr_setval() = integer()
 </code></pre>
 </code></pre>
@@ -90,11 +77,9 @@ ctr_setval() = integer()
 
 
 
 
 
 
-
 ### <a name="type-ctr_thr">ctr_thr()</a> ###
 ### <a name="type-ctr_thr">ctr_thr()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 ctr_thr() = integer()
 ctr_thr() = integer()
 </code></pre>
 </code></pre>
@@ -102,11 +87,9 @@ ctr_thr() = integer()
 
 
 
 
 
 
-
 ### <a name="type-ctr_update">ctr_update()</a> ###
 ### <a name="type-ctr_update">ctr_update()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 ctr_update() = <a href="#type-ctr_incr">ctr_incr()</a> | {<a href="#type-ctr_incr">ctr_incr()</a>, <a href="#type-ctr_thr">ctr_thr()</a>, <a href="#type-ctr_setval">ctr_setval()</a>}
 ctr_update() = <a href="#type-ctr_incr">ctr_incr()</a> | {<a href="#type-ctr_incr">ctr_incr()</a>, <a href="#type-ctr_thr">ctr_thr()</a>, <a href="#type-ctr_setval">ctr_setval()</a>}
 </code></pre>
 </code></pre>
@@ -114,11 +97,9 @@ ctr_update() = <a href="#type-ctr_incr">ctr_incr()</a> | {<a href="#type-ctr_inc
 
 
 
 
 
 
-
 ### <a name="type-headpat">headpat()</a> ###
 ### <a name="type-headpat">headpat()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 headpat() = {<a href="#type-keypat">keypat()</a>, <a href="#type-pidpat">pidpat()</a>, any()}
 headpat() = {<a href="#type-keypat">keypat()</a>, <a href="#type-pidpat">pidpat()</a>, any()}
 </code></pre>
 </code></pre>
@@ -126,11 +107,9 @@ headpat() = {<a href="#type-keypat">keypat()</a>, <a href="#type-pidpat">pidpat(
 
 
 
 
 
 
-
 ### <a name="type-increment">increment()</a> ###
 ### <a name="type-increment">increment()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 increment() = <a href="#type-ctr_incr">ctr_incr()</a> | <a href="#type-ctr_update">ctr_update()</a> | [<a href="#type-ctr_update">ctr_update()</a>]
 increment() = <a href="#type-ctr_incr">ctr_incr()</a> | <a href="#type-ctr_update">ctr_update()</a> | [<a href="#type-ctr_update">ctr_update()</a>]
 </code></pre>
 </code></pre>
@@ -138,11 +117,9 @@ increment() = <a href="#type-ctr_incr">ctr_incr()</a> | <a href="#type-ctr_updat
 
 
 
 
 
 
-
 ### <a name="type-key">key()</a> ###
 ### <a name="type-key">key()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 key() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>, any()}
 key() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>, any()}
 </code></pre>
 </code></pre>
@@ -150,11 +127,9 @@ key() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>, any
 
 
 
 
 
 
-
 ### <a name="type-keypat">keypat()</a> ###
 ### <a name="type-keypat">keypat()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 keypat() = {<a href="#type-sel_type">sel_type()</a> | <a href="#type-sel_var">sel_var()</a>, l | g | <a href="#type-sel_var">sel_var()</a>, any()}
 keypat() = {<a href="#type-sel_type">sel_type()</a> | <a href="#type-sel_var">sel_var()</a>, l | g | <a href="#type-sel_var">sel_var()</a>, any()}
 </code></pre>
 </code></pre>
@@ -162,11 +137,9 @@ keypat() = {<a href="#type-sel_type">sel_type()</a> | <a href="#type-sel_var">se
 
 
 
 
 
 
-
 ### <a name="type-monitor_type">monitor_type()</a> ###
 ### <a name="type-monitor_type">monitor_type()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 monitor_type() = info | standby | follow
 monitor_type() = info | standby | follow
 </code></pre>
 </code></pre>
@@ -174,11 +147,9 @@ monitor_type() = info | standby | follow
 
 
 
 
 
 
-
 ### <a name="type-pidpat">pidpat()</a> ###
 ### <a name="type-pidpat">pidpat()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 pidpat() = pid() | <a href="#type-sel_var">sel_var()</a>
 pidpat() = pid() | <a href="#type-sel_var">sel_var()</a>
 </code></pre>
 </code></pre>
@@ -186,11 +157,9 @@ pidpat() = pid() | <a href="#type-sel_var">sel_var()</a>
 
 
 
 
 
 
-
 ### <a name="type-reg_id">reg_id()</a> ###
 ### <a name="type-reg_id">reg_id()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 reg_id() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>, any()}
 reg_id() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>, any()}
 </code></pre>
 </code></pre>
@@ -198,11 +167,9 @@ reg_id() = {<a href="#type-type">type()</a>, <a href="#type-scope">scope()</a>,
 
 
 
 
 
 
-
 ### <a name="type-scope">scope()</a> ###
 ### <a name="type-scope">scope()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 scope() = l | g
 scope() = l | g
 </code></pre>
 </code></pre>
@@ -210,11 +177,9 @@ scope() = l | g
 
 
 
 
 
 
-
 ### <a name="type-sel_context">sel_context()</a> ###
 ### <a name="type-sel_context">sel_context()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 sel_context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()</a>} | <a href="#type-type">type()</a>
 sel_context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()</a>} | <a href="#type-type">type()</a>
 </code></pre>
 </code></pre>
@@ -222,11 +187,9 @@ sel_context() = {<a href="#type-scope">scope()</a>, <a href="#type-type">type()<
 
 
 
 
 
 
-
 ### <a name="type-sel_pattern">sel_pattern()</a> ###
 ### <a name="type-sel_pattern">sel_pattern()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 sel_pattern() = [{<a href="#type-headpat">headpat()</a>, list(), list()}]
 sel_pattern() = [{<a href="#type-headpat">headpat()</a>, list(), list()}]
 </code></pre>
 </code></pre>
@@ -234,11 +197,9 @@ sel_pattern() = [{<a href="#type-headpat">headpat()</a>, list(), list()}]
 
 
 
 
 
 
-
 ### <a name="type-sel_scope">sel_scope()</a> ###
 ### <a name="type-sel_scope">sel_scope()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 sel_scope() = scope | all | global | local
 sel_scope() = scope | all | global | local
 </code></pre>
 </code></pre>
@@ -246,11 +207,9 @@ sel_scope() = scope | all | global | local
 
 
 
 
 
 
-
 ### <a name="type-sel_type">sel_type()</a> ###
 ### <a name="type-sel_type">sel_type()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 sel_type() = <a href="#type-type">type()</a> | names | props | counters | aggr_counters | resources | resource_counters
 sel_type() = <a href="#type-type">type()</a> | names | props | counters | aggr_counters | resources | resource_counters
 </code></pre>
 </code></pre>
@@ -258,11 +217,9 @@ sel_type() = <a href="#type-type">type()</a> | names | props | counters | aggr_c
 
 
 
 
 
 
-
 ### <a name="type-sel_var">sel_var()</a> ###
 ### <a name="type-sel_var">sel_var()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 sel_var() = '_' | atom()
 sel_var() = '_' | atom()
 </code></pre>
 </code></pre>
@@ -270,11 +227,9 @@ sel_var() = '_' | atom()
 
 
 
 
 
 
-
 ### <a name="type-type">type()</a> ###
 ### <a name="type-type">type()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 type() = n | p | c | a | r | rc
 type() = n | p | c | a | r | rc
 </code></pre>
 </code></pre>
@@ -282,16 +237,13 @@ type() = n | p | c | a | r | rc
 
 
 
 
 
 
-
 ### <a name="type-unique_id">unique_id()</a> ###
 ### <a name="type-unique_id">unique_id()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 unique_id() = {n | a, <a href="#type-scope">scope()</a>, any()}
 unique_id() = {n | a, <a href="#type-scope">scope()</a>, any()}
 </code></pre>
 </code></pre>
 
 
-
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -319,6 +271,7 @@ a unique name registered via gproc.</td></tr><tr><td valign="top"><a href="#mreg
 Equivalent to [`reg({a, g, Name})`](#reg-1).
 Equivalent to [`reg({a, g, Name})`](#reg-1).
 
 
 Registers a global (unique) aggregated counter.
 Registers a global (unique) aggregated counter.
+
 <a name="add_global_counter-2"></a>
 <a name="add_global_counter-2"></a>
 
 
 ### add_global_counter/2 ###
 ### add_global_counter/2 ###
@@ -326,6 +279,7 @@ Registers a global (unique) aggregated counter.
 `add_global_counter(Name, Initial) -> any()`
 `add_global_counter(Name, Initial) -> any()`
 
 
 Registers a global (non-unique) counter. @equiv reg({c,g,Name},Value)
 Registers a global (non-unique) counter. @equiv reg({c,g,Name},Value)
+
 <a name="add_global_name-1"></a>
 <a name="add_global_name-1"></a>
 
 
 ### add_global_name/1 ###
 ### add_global_name/1 ###
@@ -333,6 +287,7 @@ Registers a global (non-unique) counter. @equiv reg({c,g,Name},Value)
 `add_global_name(Name) -> any()`
 `add_global_name(Name) -> any()`
 
 
 Registers a global (unique) name. @equiv reg({n,g,Name})
 Registers a global (unique) name. @equiv reg({n,g,Name})
+
 <a name="add_global_property-2"></a>
 <a name="add_global_property-2"></a>
 
 
 ### add_global_property/2 ###
 ### add_global_property/2 ###
@@ -340,6 +295,7 @@ Registers a global (unique) name. @equiv reg({n,g,Name})
 `add_global_property(Name, Value) -> any()`
 `add_global_property(Name, Value) -> any()`
 
 
 Registers a global (non-unique) property. @equiv reg({p,g,Name},Value)
 Registers a global (non-unique) property. @equiv reg({p,g,Name},Value)
+
 <a name="add_local_aggr_counter-1"></a>
 <a name="add_local_aggr_counter-1"></a>
 
 
 ### add_local_aggr_counter/1 ###
 ### add_local_aggr_counter/1 ###
@@ -349,6 +305,7 @@ Registers a global (non-unique) property. @equiv reg({p,g,Name},Value)
 Equivalent to [`reg({a, l, Name})`](#reg-1).
 Equivalent to [`reg({a, l, Name})`](#reg-1).
 
 
 Registers a local (unique) aggregated counter.
 Registers a local (unique) aggregated counter.
+
 <a name="add_local_counter-2"></a>
 <a name="add_local_counter-2"></a>
 
 
 ### add_local_counter/2 ###
 ### add_local_counter/2 ###
@@ -356,6 +313,7 @@ Registers a local (unique) aggregated counter.
 `add_local_counter(Name, Initial) -> any()`
 `add_local_counter(Name, Initial) -> any()`
 
 
 Registers a local (non-unique) counter. @equiv reg({c,l,Name},Value)
 Registers a local (non-unique) counter. @equiv reg({c,l,Name},Value)
+
 <a name="add_local_name-1"></a>
 <a name="add_local_name-1"></a>
 
 
 ### add_local_name/1 ###
 ### add_local_name/1 ###
@@ -363,6 +321,7 @@ Registers a local (non-unique) counter. @equiv reg({c,l,Name},Value)
 `add_local_name(Name) -> any()`
 `add_local_name(Name) -> any()`
 
 
 Registers a local (unique) name. @equiv reg({n,l,Name})
 Registers a local (unique) name. @equiv reg({n,l,Name})
+
 <a name="add_local_property-2"></a>
 <a name="add_local_property-2"></a>
 
 
 ### add_local_property/2 ###
 ### add_local_property/2 ###
@@ -370,6 +329,7 @@ Registers a local (unique) name. @equiv reg({n,l,Name})
 `add_local_property(Name, Value) -> any()`
 `add_local_property(Name, Value) -> any()`
 
 
 Registers a local (non-unique) property. @equiv reg({p,l,Name},Value)
 Registers a local (non-unique) property. @equiv reg({p,l,Name},Value)
+
 <a name="add_shared_local_counter-2"></a>
 <a name="add_shared_local_counter-2"></a>
 
 
 ### add_shared_local_counter/2 ###
 ### add_shared_local_counter/2 ###
@@ -379,33 +339,31 @@ Registers a local (non-unique) property. @equiv reg({p,l,Name},Value)
 Equivalent to [`reg_shared({c, l, Name}, Value)`](#reg_shared-2).
 Equivalent to [`reg_shared({c, l, Name}, Value)`](#reg_shared-2).
 
 
 Registers a local shared (unique) counter.
 Registers a local shared (unique) counter.
+
 <a name="audit_process-1"></a>
 <a name="audit_process-1"></a>
 
 
 ### audit_process/1 ###
 ### audit_process/1 ###
 
 
-
 <pre><code>
 <pre><code>
 audit_process(Pid::pid()) -&gt; ok
 audit_process(Pid::pid()) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 <a name="await-1"></a>
 <a name="await-1"></a>
 
 
 ### await/1 ###
 ### await/1 ###
 
 
-
 <pre><code>
 <pre><code>
 await(Key::<a href="#type-key">key()</a>) -&gt; {pid(), Value}
 await(Key::<a href="#type-key">key()</a>) -&gt; {pid(), Value}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`await(Key, infinity)`](#await-2).
 Equivalent to [`await(Key, infinity)`](#await-2).
+
 <a name="await-2"></a>
 <a name="await-2"></a>
 
 
 ### await/2 ###
 ### await/2 ###
 
 
-
 <pre><code>
 <pre><code>
 await(Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 await(Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 </code></pre>
 </code></pre>
@@ -419,11 +377,11 @@ A small optimization: we first perform a lookup, to see if the name
 is already registered. This way, the cost of the operation will be
 is already registered. This way, the cost of the operation will be
 roughly the same as of where/1 in the case where the name is already
 roughly the same as of where/1 in the case where the name is already
 registered (the difference: await/2 also returns the value).
 registered (the difference: await/2 also returns the value).
+
 <a name="await-3"></a>
 <a name="await-3"></a>
 
 
 ### await/3 ###
 ### await/3 ###
 
 
-
 <pre><code>
 <pre><code>
 await(Node::node(), Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 await(Node::node(), Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 </code></pre>
 </code></pre>
@@ -435,31 +393,29 @@ This function works exactly like [`await/2`](#await-2), but queries a remote
 node instead. An exception is thrown if `Node` cannot be reached. If gproc
 node instead. An exception is thrown if `Node` cannot be reached. If gproc
 is not running on a given node, this is treated the same as the node being
 is not running on a given node, this is treated the same as the node being
 down.
 down.
+
 <a name="bcast-2"></a>
 <a name="bcast-2"></a>
 
 
 ### bcast/2 ###
 ### bcast/2 ###
 
 
-
 <pre><code>
 <pre><code>
 bcast(Key::<a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 bcast(Key::<a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`bcast(nodes(), Key, Msg)`](#bcast-3).
 Equivalent to [`bcast(nodes(), Key, Msg)`](#bcast-3).
+
 <a name="bcast-3"></a>
 <a name="bcast-3"></a>
 
 
 ### bcast/3 ###
 ### bcast/3 ###
 
 
-
 <pre><code>
 <pre><code>
 bcast(Nodes::[atom()], Key::<a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 bcast(Nodes::[atom()], Key::<a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Sends a message to processes corresponding to Key on Nodes.
 Sends a message to processes corresponding to Key on Nodes.
 
 
-
 This function complements `send/2` and works on locally registered resources
 This function complements `send/2` and works on locally registered resources
 that `send/2` supports. Messages are routed via a special broadcast server
 that `send/2` supports. Messages are routed via a special broadcast server
 on each node to ensure that ordering is preserved. Distributed delivery
 on each node to ensure that ordering is preserved. Distributed delivery
@@ -467,59 +423,53 @@ is asynchronous and carries the same guarantees as normal message passing
 (with the added proviso that the broadcast server also needs to be available).
 (with the added proviso that the broadcast server also needs to be available).
 
 
 __See also:__ [send/2](#send-2).
 __See also:__ [send/2](#send-2).
+
 <a name="cancel_wait-2"></a>
 <a name="cancel_wait-2"></a>
 
 
 ### cancel_wait/2 ###
 ### cancel_wait/2 ###
 
 
-
 <pre><code>
 <pre><code>
 cancel_wait(Key::<a href="#type-key">key()</a>, Ref) -&gt; ok
 cancel_wait(Key::<a href="#type-key">key()</a>, Ref) -&gt; ok
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Ref = all | reference()</code></li></ul>
 <ul class="definitions"><li><code>Ref = all | reference()</code></li></ul>
 
 
-
 Cancels a previous call to nb_wait/1
 Cancels a previous call to nb_wait/1
 
 
-
 If `Ref = all`, all wait requests on `Key` from the calling process
 If `Ref = all`, all wait requests on `Key` from the calling process
 are canceled.
 are canceled.
+
 <a name="cancel_wait-3"></a>
 <a name="cancel_wait-3"></a>
 
 
 ### cancel_wait/3 ###
 ### cancel_wait/3 ###
 
 
-
 <pre><code>
 <pre><code>
 cancel_wait(Node::node(), Key::<a href="#type-key">key()</a>, Ref) -&gt; ok
 cancel_wait(Node::node(), Key::<a href="#type-key">key()</a>, Ref) -&gt; ok
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Ref = all | reference()</code></li></ul>
 <ul class="definitions"><li><code>Ref = all | reference()</code></li></ul>
 
 
-
 Cancels a previous call to nb_wait/2
 Cancels a previous call to nb_wait/2
 
 
-
 This function works just like [`cancel_wait/2`](#cancel_wait-2), but talks to a remote
 This function works just like [`cancel_wait/2`](#cancel_wait-2), but talks to a remote
 node.
 node.
+
 <a name="cancel_wait_or_monitor-1"></a>
 <a name="cancel_wait_or_monitor-1"></a>
 
 
 ### cancel_wait_or_monitor/1 ###
 ### cancel_wait_or_monitor/1 ###
 
 
 `cancel_wait_or_monitor(Key) -> any()`
 `cancel_wait_or_monitor(Key) -> any()`
 
 
-
 <a name="default-1"></a>
 <a name="default-1"></a>
 
 
 ### default/1 ###
 ### default/1 ###
 
 
 `default(X1) -> any()`
 `default(X1) -> any()`
 
 
-
 <a name="demonitor-2"></a>
 <a name="demonitor-2"></a>
 
 
 ### demonitor/2 ###
 ### demonitor/2 ###
 
 
-
 <pre><code>
 <pre><code>
 demonitor(Key::<a href="#type-key">key()</a>, Ref::reference()) -&gt; ok
 demonitor(Key::<a href="#type-key">key()</a>, Ref::reference()) -&gt; ok
 </code></pre>
 </code></pre>
@@ -528,76 +478,68 @@ demonitor(Key::<a href="#type-key">key()</a>, Ref::reference()) -&gt; ok
 Remove a monitor on a registered name
 Remove a monitor on a registered name
 This function is the reverse of monitor/1. It removes a monitor previously
 This function is the reverse of monitor/1. It removes a monitor previously
 set on a unique name. This function always succeeds given legal input.
 set on a unique name. This function always succeeds given legal input.
+
 <a name="first-1"></a>
 <a name="first-1"></a>
 
 
 ### first/1 ###
 ### first/1 ###
 
 
-
 <pre><code>
 <pre><code>
 first(Context::<a href="#type-context">context()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 first(Context::<a href="#type-context">context()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Behaves as ets:first(Tab) for a given type of registration.
 Behaves as ets:first(Tab) for a given type of registration.
 
 
-
 See [`http://www.erlang.org/doc/man/ets.html#first-1`](http://www.erlang.org/doc/man/ets.html#first-1).
 See [`http://www.erlang.org/doc/man/ets.html#first-1`](http://www.erlang.org/doc/man/ets.html#first-1).
 The registry behaves as an ordered_set table.
 The registry behaves as an ordered_set table.
+
 <a name="get_attribute-2"></a>
 <a name="get_attribute-2"></a>
 
 
 ### get_attribute/2 ###
 ### get_attribute/2 ###
 
 
-
 <pre><code>
 <pre><code>
 get_attribute(Key, Attribute::atom()) -&gt; Value
 get_attribute(Key, Attribute::atom()) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Get attribute value of `Attr` associated with `Key` for most likely Pid.
 Get attribute value of `Attr` associated with `Key` for most likely Pid.
 
 
-
 The most likely Pid in this case is `self()` for properties and counters,
 The most likely Pid in this case is `self()` for properties and counters,
 and the current registration holder in case of names or aggregated counters.
 and the current registration holder in case of names or aggregated counters.
 An exception is raised if `Key` is not registered for the given process.
 An exception is raised if `Key` is not registered for the given process.
+
 <a name="get_attribute-3"></a>
 <a name="get_attribute-3"></a>
 
 
 ### get_attribute/3 ###
 ### get_attribute/3 ###
 
 
-
 <pre><code>
 <pre><code>
 get_attribute(Key, Pid::pid() | shared, Attr::atom()) -&gt; Value
 get_attribute(Key, Pid::pid() | shared, Attr::atom()) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Get the attribute value of `Attr` associated with `Key` for process Pid.
 Get the attribute value of `Attr` associated with `Key` for process Pid.
 
 
-
 If `Pid == shared`, the attribute of a shared key (see [`reg_shared/1`](#reg_shared-1))
 If `Pid == shared`, the attribute of a shared key (see [`reg_shared/1`](#reg_shared-1))
 will be read.
 will be read.
+
 <a name="get_attribute_shared-2"></a>
 <a name="get_attribute_shared-2"></a>
 
 
 ### get_attribute_shared/2 ###
 ### get_attribute_shared/2 ###
 
 
-
 <pre><code>
 <pre><code>
 get_attribute_shared(Key, Attr::atom()) -&gt; Value
 get_attribute_shared(Key, Attr::atom()) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Get the attribute value of `Attr` associated with the shared `Key`.
 Get the attribute value of `Attr` associated with the shared `Key`.
 
 
-
 Equivalent to `get_attribute(Key, shared, Attr)`
 Equivalent to `get_attribute(Key, shared, Attr)`
 (see [`get_attribute/3`](#get_attribute-3)).
 (see [`get_attribute/3`](#get_attribute-3)).
+
 <a name="get_attributes-1"></a>
 <a name="get_attributes-1"></a>
 
 
 ### get_attributes/1 ###
 ### get_attributes/1 ###
 
 
-
 <pre><code>
 <pre><code>
 get_attributes(Key::<a href="#type-key">key()</a>) -&gt; [{K, V}]
 get_attributes(Key::<a href="#type-key">key()</a>) -&gt; [{K, V}]
 </code></pre>
 </code></pre>
@@ -606,20 +548,18 @@ get_attributes(Key::<a href="#type-key">key()</a>) -&gt; [{K, V}]
 Equivalent to [`get_attributes(Key, self())`](#get_attributes-2).
 Equivalent to [`get_attributes(Key, self())`](#get_attributes-2).
 
 
 Get attributes associated with registration.
 Get attributes associated with registration.
+
 <a name="get_attributes-2"></a>
 <a name="get_attributes-2"></a>
 
 
 ### get_attributes/2 ###
 ### get_attributes/2 ###
 
 
-
 <pre><code>
 <pre><code>
 get_attributes(Key::<a href="#type-key">key()</a>, Pid::pid() | shared) -&gt; [{K, V}]
 get_attributes(Key::<a href="#type-key">key()</a>, Pid::pid() | shared) -&gt; [{K, V}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Returns the list of attributes associated with the registration.
 Returns the list of attributes associated with the registration.
 
 
-
 This function raises a `badarg` exception if there is no corresponding
 This function raises a `badarg` exception if there is no corresponding
 registration.
 registration.
 
 
@@ -627,36 +567,30 @@ registration.
 
 
 ### get_env/3 ###
 ### get_env/3 ###
 
 
-
 <pre><code>
 <pre><code>
 get_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom()) -&gt; term()
 get_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom()) -&gt; term()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`get_env(Scope, App, Key, [app_env])`](#get_env-4).
 Equivalent to [`get_env(Scope, App, Key, [app_env])`](#get_env-4).
+
 <a name="get_env-4"></a>
 <a name="get_env-4"></a>
 
 
 ### get_env/4 ###
 ### get_env/4 ###
 
 
-
 <pre><code>
 <pre><code>
 get_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Strategy) -&gt; term()
 get_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Strategy) -&gt; term()
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Strategy = [Alternative]</code></li><li><code>Alternative = app_env | os_env | inherit | {inherit, pid()} | {inherit, <a href="#type-unique_id">unique_id()</a>} | init_arg | {mnesia, ActivityType, Oid, Pos} | {default, term()} | error</code></li></ul>
 <ul class="definitions"><li><code>Strategy = [Alternative]</code></li><li><code>Alternative = app_env | os_env | inherit | {inherit, pid()} | {inherit, <a href="#type-unique_id">unique_id()</a>} | init_arg | {mnesia, ActivityType, Oid, Pos} | {default, term()} | error</code></li></ul>
 
 
-
 Read an environment value, potentially cached as a `gproc_env` property.
 Read an environment value, potentially cached as a `gproc_env` property.
 
 
-
-
 This function first tries to read the value of a cached property,
 This function first tries to read the value of a cached property,
 `{p, Scope, {gproc_env, App, Key}}`. If this fails, it will try the provided
 `{p, Scope, {gproc_env, App, Key}}`. If this fails, it will try the provided
 alternative strategy. `Strategy` is a list of alternatives, tried in order.
 alternative strategy. `Strategy` is a list of alternatives, tried in order.
 Each alternative can be one of:
 Each alternative can be one of:
 
 
-
-
 * `app_env` - try `application:get_env(App, Key)`
 * `app_env` - try `application:get_env(App, Key)`
 * `os_env` - try `os:getenv(ENV)`, where `ENV` is `Key` converted into an
 * `os_env` - try `os:getenv(ENV)`, where `ENV` is `Key` converted into an
 uppercase string
 uppercase string
@@ -673,159 +607,133 @@ the value in position `Pos` if object found.
 been exhausted; if not set, `undefined` will be returned.
 been exhausted; if not set, `undefined` will be returned.
 * `error` - raise an exception, `erlang:error(gproc_env, [App, Key, Scope])`.
 * `error` - raise an exception, `erlang:error(gproc_env, [App, Key, Scope])`.
 
 
-
-
 While any alternative can occur more than once, the only one that might make
 While any alternative can occur more than once, the only one that might make
 sense to use multiple times is `{default, Value}`.
 sense to use multiple times is `{default, Value}`.
 
 
-
-
 The return value will be one of:
 The return value will be one of:
 
 
-
-
 * The value of the first matching alternative, or `error` eception,
 * The value of the first matching alternative, or `error` eception,
 whichever comes first
 whichever comes first
 * The last instance of `{default, Value}`, or `undefined`, if there is no
 * The last instance of `{default, Value}`, or `undefined`, if there is no
 matching alternative, default or `error` entry in the list.
 matching alternative, default or `error` entry in the list.
 
 
-
 The `error` option can be used to assert that a value has been previously
 The `error` option can be used to assert that a value has been previously
 cached. Alternatively, it can be used to assert that a value is either cached
 cached. Alternatively, it can be used to assert that a value is either cached
 or at least defined somewhere,
 or at least defined somewhere,
 e.g. `get_env(l, mnesia, dir, [app_env, error])`.
 e.g. `get_env(l, mnesia, dir, [app_env, error])`.
+
 <a name="get_set_env-3"></a>
 <a name="get_set_env-3"></a>
 
 
 ### get_set_env/3 ###
 ### get_set_env/3 ###
 
 
-
 <pre><code>
 <pre><code>
 get_set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom()) -&gt; term()
 get_set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom()) -&gt; term()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`get_set_env(Scope, App, Key, [app_env])`](#get_set_env-4).
 Equivalent to [`get_set_env(Scope, App, Key, [app_env])`](#get_set_env-4).
+
 <a name="get_set_env-4"></a>
 <a name="get_set_env-4"></a>
 
 
 ### get_set_env/4 ###
 ### get_set_env/4 ###
 
 
-
 <pre><code>
 <pre><code>
 get_set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Strategy) -&gt; Value
 get_set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Strategy) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Fetch and cache an environment value, if not already cached.
 Fetch and cache an environment value, if not already cached.
 
 
-
 This function does the same thing as [`get_env/4`](#get_env-4), but also updates the
 This function does the same thing as [`get_env/4`](#get_env-4), but also updates the
 cache. Note that the cache will be updated even if the result of the lookup
 cache. Note that the cache will be updated even if the result of the lookup
 is `undefined`.
 is `undefined`.
 
 
-
 __See also:__ [get_env/4](#get_env-4).
 __See also:__ [get_env/4](#get_env-4).
+
 <a name="get_value-1"></a>
 <a name="get_value-1"></a>
 
 
 ### get_value/1 ###
 ### get_value/1 ###
 
 
-
 <pre><code>
 <pre><code>
 get_value(Key) -&gt; Value
 get_value(Key) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Reads the value stored with a key registered to the current process.
 Reads the value stored with a key registered to the current process.
 
 
-
 If no such key is registered to the current process, this function exits.
 If no such key is registered to the current process, this function exits.
+
 <a name="get_value-2"></a>
 <a name="get_value-2"></a>
 
 
 ### get_value/2 ###
 ### get_value/2 ###
 
 
-
 <pre><code>
 <pre><code>
 get_value(Key, Pid) -&gt; Value
 get_value(Key, Pid) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Reads the value stored with a key registered to the process Pid.
 Reads the value stored with a key registered to the process Pid.
 
 
-
 If `Pid == shared`, the value of a shared key (see [`reg_shared/1`](#reg_shared-1))
 If `Pid == shared`, the value of a shared key (see [`reg_shared/1`](#reg_shared-1))
 will be read.
 will be read.
+
 <a name="get_value_shared-1"></a>
 <a name="get_value_shared-1"></a>
 
 
 ### get_value_shared/1 ###
 ### get_value_shared/1 ###
 
 
-
 <pre><code>
 <pre><code>
 get_value_shared(Key) -&gt; Value
 get_value_shared(Key) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Reads the value stored with a shared key.
 Reads the value stored with a shared key.
 
 
-
 If no such shared key is registered, this function exits.
 If no such shared key is registered, this function exits.
+
 <a name="give_away-2"></a>
 <a name="give_away-2"></a>
 
 
 ### give_away/2 ###
 ### give_away/2 ###
 
 
-
 <pre><code>
 <pre><code>
 give_away(From::<a href="#type-key">key()</a>, To::pid() | <a href="#type-key">key()</a>) -&gt; undefined | pid()
 give_away(From::<a href="#type-key">key()</a>, To::pid() | <a href="#type-key">key()</a>) -&gt; undefined | pid()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Atomically transfers the key `From` to the process identified by `To`.
 Atomically transfers the key `From` to the process identified by `To`.
 
 
-
-
 This function transfers any gproc key (name, property, counter, aggr counter)
 This function transfers any gproc key (name, property, counter, aggr counter)
 from one process to another, and returns the pid of the new owner.
 from one process to another, and returns the pid of the new owner.
 
 
-
-
 `To` must be either a pid or a unique name (name or aggregated counter), but
 `To` must be either a pid or a unique name (name or aggregated counter), but
 does not necessarily have to resolve to an existing process. If there is
 does not necessarily have to resolve to an existing process. If there is
 no process registered with the `To` key, `give_away/2` returns `undefined`,
 no process registered with the `To` key, `give_away/2` returns `undefined`,
 and the `From` key is effectively unregistered.
 and the `From` key is effectively unregistered.
 
 
-
-
 It is allowed to give away a key to oneself, but of course, this operation
 It is allowed to give away a key to oneself, but of course, this operation
 will have no effect.
 will have no effect.
 
 
-
 Fails with `badarg` if the calling process does not have a `From` key
 Fails with `badarg` if the calling process does not have a `From` key
 registered.
 registered.
+
 <a name="goodbye-0"></a>
 <a name="goodbye-0"></a>
 
 
 ### goodbye/0 ###
 ### goodbye/0 ###
 
 
-
 <pre><code>
 <pre><code>
 goodbye() -&gt; ok
 goodbye() -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Unregister all items of the calling process and inform gproc
 Unregister all items of the calling process and inform gproc
 to forget about the calling process.
 to forget about the calling process.
 
 
-
 This function is more efficient than letting gproc perform these
 This function is more efficient than letting gproc perform these
 cleanup operations.
 cleanup operations.
+
 <a name="i-0"></a>
 <a name="i-0"></a>
 
 
 ### i/0 ###
 ### i/0 ###
 
 
-
 <pre><code>
 <pre><code>
 i() -&gt; ok
 i() -&gt; ok
 </code></pre>
 </code></pre>
@@ -833,62 +741,56 @@ i() -&gt; ok
 
 
 Similar to the built-in shell command `i()` but inserts information
 Similar to the built-in shell command `i()` but inserts information
 about names and properties registered in Gproc, where applicable.
 about names and properties registered in Gproc, where applicable.
+
 <a name="info-1"></a>
 <a name="info-1"></a>
 
 
 ### info/1 ###
 ### info/1 ###
 
 
-
 <pre><code>
 <pre><code>
 info(Pid::pid()) -&gt; ProcessInfo
 info(Pid::pid()) -&gt; ProcessInfo
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>ProcessInfo = [{gproc, [{Key, Value}]} | ProcessInfo]</code></li></ul>
 <ul class="definitions"><li><code>ProcessInfo = [{gproc, [{Key, Value}]} | ProcessInfo]</code></li></ul>
 
 
-
 Similar to `process_info(Pid)` but with additional gproc info.
 Similar to `process_info(Pid)` but with additional gproc info.
 
 
-
 Returns the same information as process_info(Pid), but with the
 Returns the same information as process_info(Pid), but with the
 addition of a `gproc` information item, containing the `{Key,Value}`
 addition of a `gproc` information item, containing the `{Key,Value}`
 pairs registered to the process.
 pairs registered to the process.
+
 <a name="info-2"></a>
 <a name="info-2"></a>
 
 
 ### info/2 ###
 ### info/2 ###
 
 
-
 <pre><code>
 <pre><code>
 info(Pid::pid(), Item::atom()) -&gt; {Item, Info}
 info(Pid::pid(), Item::atom()) -&gt; {Item, Info}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Similar to process_info(Pid, Item), but with additional gproc info.
 Similar to process_info(Pid, Item), but with additional gproc info.
 
 
-
 For `Item = gproc`, this function returns a list of `{Key, Value}` pairs
 For `Item = gproc`, this function returns a list of `{Key, Value}` pairs
 registered to the process Pid. For other values of Item, it returns the
 registered to the process Pid. For other values of Item, it returns the
 same as [`http://www.erlang.org/doc/man/erlang.html#process_info-2`](http://www.erlang.org/doc/man/erlang.html#process_info-2).
 same as [`http://www.erlang.org/doc/man/erlang.html#process_info-2`](http://www.erlang.org/doc/man/erlang.html#process_info-2).
+
 <a name="last-1"></a>
 <a name="last-1"></a>
 
 
 ### last/1 ###
 ### last/1 ###
 
 
-
 <pre><code>
 <pre><code>
 last(Context::<a href="#type-context">context()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 last(Context::<a href="#type-context">context()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Behaves as ets:last(Tab) for a given type of registration.
 Behaves as ets:last(Tab) for a given type of registration.
 
 
-
 See [`http://www.erlang.org/doc/man/ets.html#last-1`](http://www.erlang.org/doc/man/ets.html#last-1).
 See [`http://www.erlang.org/doc/man/ets.html#last-1`](http://www.erlang.org/doc/man/ets.html#last-1).
 The registry behaves as an ordered_set table.
 The registry behaves as an ordered_set table.
+
 <a name="lookup_global_aggr_counter-1"></a>
 <a name="lookup_global_aggr_counter-1"></a>
 
 
 ### lookup_global_aggr_counter/1 ###
 ### lookup_global_aggr_counter/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_global_aggr_counter(Name::any()) -&gt; integer()
 lookup_global_aggr_counter(Name::any()) -&gt; integer()
 </code></pre>
 </code></pre>
@@ -898,11 +800,11 @@ Equivalent to [`lookup_value({a, g, Name})`](#lookup_value-1).
 
 
 Lookup a global (unique) aggregated counter and returns its value.
 Lookup a global (unique) aggregated counter and returns its value.
 Fails if there is no such object.
 Fails if there is no such object.
+
 <a name="lookup_global_counters-1"></a>
 <a name="lookup_global_counters-1"></a>
 
 
 ### lookup_global_counters/1 ###
 ### lookup_global_counters/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_global_counters(Counter::any()) -&gt; [{pid(), Value::integer()}]
 lookup_global_counters(Counter::any()) -&gt; [{pid(), Value::integer()}]
 </code></pre>
 </code></pre>
@@ -912,11 +814,11 @@ Equivalent to [`lookup_values({c, g, Counter})`](#lookup_values-1).
 
 
 Look up all global (non-unique) instances of a given Counter.
 Look up all global (non-unique) instances of a given Counter.
 Returns a list of {Pid, Value} tuples for all matching objects.
 Returns a list of {Pid, Value} tuples for all matching objects.
+
 <a name="lookup_global_name-1"></a>
 <a name="lookup_global_name-1"></a>
 
 
 ### lookup_global_name/1 ###
 ### lookup_global_name/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_global_name(Name::any()) -&gt; pid()
 lookup_global_name(Name::any()) -&gt; pid()
 </code></pre>
 </code></pre>
@@ -925,11 +827,11 @@ lookup_global_name(Name::any()) -&gt; pid()
 Equivalent to [`where({n, g, Name})`](#where-1).
 Equivalent to [`where({n, g, Name})`](#where-1).
 
 
 Lookup a global unique name. Fails if there is no such name.
 Lookup a global unique name. Fails if there is no such name.
+
 <a name="lookup_global_properties-1"></a>
 <a name="lookup_global_properties-1"></a>
 
 
 ### lookup_global_properties/1 ###
 ### lookup_global_properties/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_global_properties(Property::any()) -&gt; [{pid(), Value}]
 lookup_global_properties(Property::any()) -&gt; [{pid(), Value}]
 </code></pre>
 </code></pre>
@@ -939,11 +841,11 @@ Equivalent to [`lookup_values({p, g, Property})`](#lookup_values-1).
 
 
 Look up all global (non-unique) instances of a given Property.
 Look up all global (non-unique) instances of a given Property.
 Returns a list of {Pid, Value} tuples for all matching objects.
 Returns a list of {Pid, Value} tuples for all matching objects.
+
 <a name="lookup_local_aggr_counter-1"></a>
 <a name="lookup_local_aggr_counter-1"></a>
 
 
 ### lookup_local_aggr_counter/1 ###
 ### lookup_local_aggr_counter/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_local_aggr_counter(Name::any()) -&gt; integer()
 lookup_local_aggr_counter(Name::any()) -&gt; integer()
 </code></pre>
 </code></pre>
@@ -953,11 +855,11 @@ Equivalent to [`where({a, l, Name})`](#where-1).
 
 
 Lookup a local (unique) aggregated counter and returns its value.
 Lookup a local (unique) aggregated counter and returns its value.
 Fails if there is no such object.
 Fails if there is no such object.
+
 <a name="lookup_local_counters-1"></a>
 <a name="lookup_local_counters-1"></a>
 
 
 ### lookup_local_counters/1 ###
 ### lookup_local_counters/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_local_counters(Counter::any()) -&gt; [{pid(), Value::integer()}]
 lookup_local_counters(Counter::any()) -&gt; [{pid(), Value::integer()}]
 </code></pre>
 </code></pre>
@@ -967,11 +869,11 @@ Equivalent to [`lookup_values({c, l, Counter})`](#lookup_values-1).
 
 
 Look up all local (non-unique) instances of a given Counter.
 Look up all local (non-unique) instances of a given Counter.
 Returns a list of {Pid, Value} tuples for all matching objects.
 Returns a list of {Pid, Value} tuples for all matching objects.
+
 <a name="lookup_local_name-1"></a>
 <a name="lookup_local_name-1"></a>
 
 
 ### lookup_local_name/1 ###
 ### lookup_local_name/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_local_name(Name::any()) -&gt; pid()
 lookup_local_name(Name::any()) -&gt; pid()
 </code></pre>
 </code></pre>
@@ -980,11 +882,11 @@ lookup_local_name(Name::any()) -&gt; pid()
 Equivalent to [`where({n, l, Name})`](#where-1).
 Equivalent to [`where({n, l, Name})`](#where-1).
 
 
 Lookup a local unique name. Fails if there is no such name.
 Lookup a local unique name. Fails if there is no such name.
+
 <a name="lookup_local_properties-1"></a>
 <a name="lookup_local_properties-1"></a>
 
 
 ### lookup_local_properties/1 ###
 ### lookup_local_properties/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_local_properties(Property::any()) -&gt; [{pid(), Value}]
 lookup_local_properties(Property::any()) -&gt; [{pid(), Value}]
 </code></pre>
 </code></pre>
@@ -994,75 +896,66 @@ Equivalent to [`lookup_values({p, l, Property})`](#lookup_values-1).
 
 
 Look up all local (non-unique) instances of a given Property.
 Look up all local (non-unique) instances of a given Property.
 Returns a list of {Pid, Value} tuples for all matching objects.
 Returns a list of {Pid, Value} tuples for all matching objects.
+
 <a name="lookup_pid-1"></a>
 <a name="lookup_pid-1"></a>
 
 
 ### lookup_pid/1 ###
 ### lookup_pid/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_pid(Key) -&gt; Pid
 lookup_pid(Key) -&gt; Pid
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Lookup the Pid stored with a key.
 Lookup the Pid stored with a key.
 
 
-
 This function raises a `badarg` exception if `Key` is not registered.
 This function raises a `badarg` exception if `Key` is not registered.
+
 <a name="lookup_pids-1"></a>
 <a name="lookup_pids-1"></a>
 
 
 ### lookup_pids/1 ###
 ### lookup_pids/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_pids(Key::<a href="#type-key">key()</a>) -&gt; [pid()]
 lookup_pids(Key::<a href="#type-key">key()</a>) -&gt; [pid()]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Returns a list of pids with the published key Key
 Returns a list of pids with the published key Key
 
 
-
-
 If the type of registration is either name or aggregated counter,
 If the type of registration is either name or aggregated counter,
 this function will return either an empty list, or a list of one pid.
 this function will return either an empty list, or a list of one pid.
 For non-unique types, the return value can be a list of any length.
 For non-unique types, the return value can be a list of any length.
 
 
-
 Note: shared resources are not associated with any pid, and will
 Note: shared resources are not associated with any pid, and will
 therefore be excluded.
 therefore be excluded.
+
 <a name="lookup_value-1"></a>
 <a name="lookup_value-1"></a>
 
 
 ### lookup_value/1 ###
 ### lookup_value/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_value(Key) -&gt; Value
 lookup_value(Key) -&gt; Value
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Lookup the value stored with a key.
 Lookup the value stored with a key.
 
 
-
 This function raises a `badarg` exception if `Key` is not registered.
 This function raises a `badarg` exception if `Key` is not registered.
+
 <a name="lookup_values-1"></a>
 <a name="lookup_values-1"></a>
 
 
 ### lookup_values/1 ###
 ### lookup_values/1 ###
 
 
-
 <pre><code>
 <pre><code>
 lookup_values(Key::<a href="#type-key">key()</a>) -&gt; [{pid(), Value}]
 lookup_values(Key::<a href="#type-key">key()</a>) -&gt; [{pid(), Value}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Retrieve the `{Pid,Value}` pairs corresponding to Key.
 Retrieve the `{Pid,Value}` pairs corresponding to Key.
 
 
-
 Key refer to any type of registry object. If it refers to a unique
 Key refer to any type of registry object. If it refers to a unique
 object, the list will be of length 0 or 1. If it refers to a non-unique
 object, the list will be of length 0 or 1. If it refers to a non-unique
 object, the return value can be a list of any length.
 object, the return value can be a list of any length.
+
 <a name="monitor-1"></a>
 <a name="monitor-1"></a>
 
 
 ### monitor/1 ###
 ### monitor/1 ###
@@ -1070,17 +963,16 @@ object, the return value can be a list of any length.
 `monitor(Key) -> any()`
 `monitor(Key) -> any()`
 
 
 Equivalent to [`monitor(Key, info)`](#monitor-2).
 Equivalent to [`monitor(Key, info)`](#monitor-2).
+
 <a name="monitor-2"></a>
 <a name="monitor-2"></a>
 
 
 ### monitor/2 ###
 ### monitor/2 ###
 
 
-
 <pre><code>
 <pre><code>
 monitor(Key::<a href="#type-key">key()</a>, Type::<a href="#type-monitor_type">monitor_type()</a>) -&gt; reference()
 monitor(Key::<a href="#type-key">key()</a>, Type::<a href="#type-monitor_type">monitor_type()</a>) -&gt; reference()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 monitor a registered name
 monitor a registered name
 `monitor(Key, info)` works much like erlang:monitor(process, Pid), but monitors
 `monitor(Key, info)` works much like erlang:monitor(process, Pid), but monitors
 a unique name registered via gproc. A message, `{gproc, unreg, Ref, Key}`
 a unique name registered via gproc. A message, `{gproc, unreg, Ref, Key}`
@@ -1090,62 +982,53 @@ message `{gproc, {failover, ToPid}, Ref, Key}` is sent to all monitors.
 If the name is passed to another process using [`give_away/2`](#give_away-2), the event
 If the name is passed to another process using [`give_away/2`](#give_away-2), the event
 `{gproc, {migrated, ToPid}, Ref, Key}` is sent to all monitors.
 `{gproc, {migrated, ToPid}, Ref, Key}` is sent to all monitors.
 
 
-
-
 `monitor(Key, standby)` sets up the monitoring process as a standby for the
 `monitor(Key, standby)` sets up the monitoring process as a standby for the
 registered name. If the registered process dies, the first standby process
 registered name. If the registered process dies, the first standby process
 inherits the name, and a message `{gproc, {failover, ToPid}, Ref, Key}` is
 inherits the name, and a message `{gproc, {failover, ToPid}, Ref, Key}` is
 sent to all monitors, including the one that inherited the name.
 sent to all monitors, including the one that inherited the name.
 
 
-
-
 If the name is not yet registered, the unreg event is sent immediately.
 If the name is not yet registered, the unreg event is sent immediately.
 If the calling process in this case tried to start a `standby` monitoring,
 If the calling process in this case tried to start a `standby` monitoring,
 it receives the registered name and the failover event immediately.
 it receives the registered name and the failover event immediately.
 
 
-
 `monitor(Key, follow)` keeps monitoring the registered name even if it is
 `monitor(Key, follow)` keeps monitoring the registered name even if it is
 temporarily unregistered. The messages received are the same as for the other
 temporarily unregistered. The messages received are the same as for the other
 monitor types, but `{gproc, registered, Ref, Key}` is also sent when a new
 monitor types, but `{gproc, registered, Ref, Key}` is also sent when a new
 process registers the name.
 process registers the name.
+
 <a name="mreg-3"></a>
 <a name="mreg-3"></a>
 
 
 ### mreg/3 ###
 ### mreg/3 ###
 
 
-
 <pre><code>
 <pre><code>
 mreg(T::<a href="#type-type">type()</a>, C::<a href="#type-scope">scope()</a>, KVL::[{Key::any(), Value::any()}]) -&gt; true
 mreg(T::<a href="#type-type">type()</a>, C::<a href="#type-scope">scope()</a>, KVL::[{Key::any(), Value::any()}]) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Register multiple {Key,Value} pairs of a given type and scope.
 Register multiple {Key,Value} pairs of a given type and scope.
 
 
-
 This function is more efficient than calling [`reg/2`](#reg-2) repeatedly.
 This function is more efficient than calling [`reg/2`](#reg-2) repeatedly.
 It is also atomic in regard to unique names; either all names are registered
 It is also atomic in regard to unique names; either all names are registered
 or none are.
 or none are.
+
 <a name="munreg-3"></a>
 <a name="munreg-3"></a>
 
 
 ### munreg/3 ###
 ### munreg/3 ###
 
 
-
 <pre><code>
 <pre><code>
 munreg(T::<a href="#type-type">type()</a>, C::<a href="#type-scope">scope()</a>, L::[Key::any()]) -&gt; true
 munreg(T::<a href="#type-type">type()</a>, C::<a href="#type-scope">scope()</a>, L::[Key::any()]) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Unregister multiple Key items of a given type and scope.
 Unregister multiple Key items of a given type and scope.
 
 
-
 This function is usually more efficient than calling [`unreg/1`](#unreg-1)
 This function is usually more efficient than calling [`unreg/1`](#unreg-1)
 repeatedly.
 repeatedly.
+
 <a name="nb_wait-1"></a>
 <a name="nb_wait-1"></a>
 
 
 ### nb_wait/1 ###
 ### nb_wait/1 ###
 
 
-
 <pre><code>
 <pre><code>
 nb_wait(Key::<a href="#type-key">key()</a>) -&gt; Ref
 nb_wait(Key::<a href="#type-key">key()</a>) -&gt; Ref
 </code></pre>
 </code></pre>
@@ -1154,11 +1037,11 @@ nb_wait(Key::<a href="#type-key">key()</a>) -&gt; Ref
 Wait for a name or aggregated counter to be registered.
 Wait for a name or aggregated counter to be registered.
 The caller can expect to receive a message,
 The caller can expect to receive a message,
 {gproc, Ref, registered, {Key, Pid, Value}}, once the name is registered.
 {gproc, Ref, registered, {Key, Pid, Value}}, once the name is registered.
+
 <a name="nb_wait-2"></a>
 <a name="nb_wait-2"></a>
 
 
 ### nb_wait/2 ###
 ### nb_wait/2 ###
 
 
-
 <pre><code>
 <pre><code>
 nb_wait(Node::node(), Key::<a href="#type-key">key()</a>) -&gt; Ref
 nb_wait(Node::node(), Key::<a href="#type-key">key()</a>) -&gt; Ref
 </code></pre>
 </code></pre>
@@ -1167,93 +1050,76 @@ nb_wait(Node::node(), Key::<a href="#type-key">key()</a>) -&gt; Ref
 Wait for a name or aggregated counter to be registered on `Node`.
 Wait for a name or aggregated counter to be registered on `Node`.
 The caller can expect to receive a message,
 The caller can expect to receive a message,
 {gproc, Ref, registered, {Key, Pid, Value}}, once the name is registered.
 {gproc, Ref, registered, {Key, Pid, Value}}, once the name is registered.
+
 <a name="next-2"></a>
 <a name="next-2"></a>
 
 
 ### next/2 ###
 ### next/2 ###
 
 
-
 <pre><code>
 <pre><code>
 next(Context::<a href="#type-context">context()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 next(Context::<a href="#type-context">context()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Behaves as ets:next(Tab,Key) for a given type of registration.
 Behaves as ets:next(Tab,Key) for a given type of registration.
 
 
-
 See [`http://www.erlang.org/doc/man/ets.html#next-2`](http://www.erlang.org/doc/man/ets.html#next-2).
 See [`http://www.erlang.org/doc/man/ets.html#next-2`](http://www.erlang.org/doc/man/ets.html#next-2).
 The registry behaves as an ordered_set table.
 The registry behaves as an ordered_set table.
+
 <a name="prev-2"></a>
 <a name="prev-2"></a>
 
 
 ### prev/2 ###
 ### prev/2 ###
 
 
-
 <pre><code>
 <pre><code>
 prev(Context::<a href="#type-context">context()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 prev(Context::<a href="#type-context">context()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Behaves as ets:prev(Tab,Key) for a given type of registration.
 Behaves as ets:prev(Tab,Key) for a given type of registration.
 
 
-
 See [`http://www.erlang.org/doc/man/ets.html#prev-2`](http://www.erlang.org/doc/man/ets.html#prev-2).
 See [`http://www.erlang.org/doc/man/ets.html#prev-2`](http://www.erlang.org/doc/man/ets.html#prev-2).
 The registry behaves as an ordered_set table.
 The registry behaves as an ordered_set table.
+
 <a name="reg-1"></a>
 <a name="reg-1"></a>
 
 
 ### reg/1 ###
 ### reg/1 ###
 
 
-
 <pre><code>
 <pre><code>
 reg(Key::<a href="#type-key">key()</a>) -&gt; true
 reg(Key::<a href="#type-key">key()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`reg(Key, default(Key), [])`](#reg-3).
 Equivalent to [`reg(Key, default(Key), [])`](#reg-3).
+
 <a name="reg-2"></a>
 <a name="reg-2"></a>
 
 
 ### reg/2 ###
 ### reg/2 ###
 
 
-
 <pre><code>
 <pre><code>
 reg(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 reg(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Register a name or property for the current process
 Register a name or property for the current process
 
 
-
-
 <a name="reg-3"></a>
 <a name="reg-3"></a>
 
 
 ### reg/3 ###
 ### reg/3 ###
 
 
-
 <pre><code>
 <pre><code>
 reg(Key::<a href="#type-key">key()</a>, Value, Attrs::[{atom(), any()}]) -&gt; true
 reg(Key::<a href="#type-key">key()</a>, Value, Attrs::[{atom(), any()}]) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Register a name or property for the current process
 Register a name or property for the current process
 `Attrs` (default: `[]`) can be inspected using [`get_attribute/2`](#get_attribute-2).
 `Attrs` (default: `[]`) can be inspected using [`get_attribute/2`](#get_attribute-2).
 
 
-
-
 The structure of `Key` is `{Type, Context, Name}`, where:
 The structure of `Key` is `{Type, Context, Name}`, where:
 
 
-
-
 * `Context :: l | g` - `l` means 'local' context; `g` means 'global'
 * `Context :: l | g` - `l` means 'local' context; `g` means 'global'
 * `Type :: p | n | c | a | r | rc` specifies the type of entry
 * `Type :: p | n | c | a | r | rc` specifies the type of entry
 
 
-
-
 The semantics of the different types:
 The semantics of the different types:
 
 
-
-
 * `p` - 'property', is non-unique, i.e. different processes can each
 * `p` - 'property', is non-unique, i.e. different processes can each
 register a property with the same name.
 register a property with the same name.
 * `n` - 'name, is unique within the given context (local or global).
 * `n` - 'name, is unique within the given context (local or global).
@@ -1268,103 +1134,87 @@ with a 'resource counter'.
 with the same name. When the resource count reaches `0`, any triggers
 with the same name. When the resource count reaches `0`, any triggers
 specified using an `on_zero` attribute may be executed (see below).
 specified using an `on_zero` attribute may be executed (see below).
 
 
-
-
 On-zero triggers:
 On-zero triggers:
 
 
-
-
 `Msg = {gproc, resource_on_zero, Context, Name, Pid}`
 `Msg = {gproc, resource_on_zero, Context, Name, Pid}`
 
 
-
 * `{send, Key}` - run `gproc:send(Key, Msg)`
 * `{send, Key}` - run `gproc:send(Key, Msg)`
 * `{bcast, Key}` - run `gproc:bcast(Key, Msg)`
 * `{bcast, Key}` - run `gproc:bcast(Key, Msg)`
 * `publish` - run
 * `publish` - run
 `gproc_ps:publish(Context, gproc_resource_on_zero, {Context, Name, Pid})`
 `gproc_ps:publish(Context, gproc_resource_on_zero, {Context, Name, Pid})`
 * `{unreg_shared, Type, Name}` - unregister the shared key
 * `{unreg_shared, Type, Name}` - unregister the shared key
 `{Type, Context, Name}`
 `{Type, Context, Name}`
+
 <a name="reg_or_locate-1"></a>
 <a name="reg_or_locate-1"></a>
 
 
 ### reg_or_locate/1 ###
 ### reg_or_locate/1 ###
 
 
-
 <pre><code>
 <pre><code>
 reg_or_locate(Key::<a href="#type-key">key()</a>) -&gt; {pid(), NewValue}
 reg_or_locate(Key::<a href="#type-key">key()</a>) -&gt; {pid(), NewValue}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`reg_or_locate(Key, default(Key))`](#reg_or_locate-2).
 Equivalent to [`reg_or_locate(Key, default(Key))`](#reg_or_locate-2).
+
 <a name="reg_or_locate-2"></a>
 <a name="reg_or_locate-2"></a>
 
 
 ### reg_or_locate/2 ###
 ### reg_or_locate/2 ###
 
 
-
 <pre><code>
 <pre><code>
 reg_or_locate(Key::<a href="#type-key">key()</a>, Value) -&gt; {pid(), NewValue}
 reg_or_locate(Key::<a href="#type-key">key()</a>, Value) -&gt; {pid(), NewValue}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Try registering a unique name, or return existing registration.
 Try registering a unique name, or return existing registration.
 
 
-
 This function tries to register the name `Key`, if available.
 This function tries to register the name `Key`, if available.
 If such a registration object already exists, the pid and value of
 If such a registration object already exists, the pid and value of
 the current registration is returned instead.
 the current registration is returned instead.
+
 <a name="reg_or_locate-3"></a>
 <a name="reg_or_locate-3"></a>
 
 
 ### reg_or_locate/3 ###
 ### reg_or_locate/3 ###
 
 
-
 <pre><code>
 <pre><code>
 reg_or_locate(Key::<a href="#type-key">key()</a>, Value, Fun::function()) -&gt; {pid(), NewValue}
 reg_or_locate(Key::<a href="#type-key">key()</a>, Value, Fun::function()) -&gt; {pid(), NewValue}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Spawn a process with a registered name, or return existing registration.
 Spawn a process with a registered name, or return existing registration.
 
 
-
-
 This function checks whether a local name is registered; if not, it spawns
 This function checks whether a local name is registered; if not, it spawns
 a new process (with `spawn(Fun)`) and gives it the name.
 a new process (with `spawn(Fun)`) and gives it the name.
 The pid and value of the resulting registration is returned.
 The pid and value of the resulting registration is returned.
 
 
-
 When a global name is registered in this fashion, the process is
 When a global name is registered in this fashion, the process is
 spawned on the caller's node, and the group_leader of the spawned
 spawned on the caller's node, and the group_leader of the spawned
 process is set to the group_leader of the calling process.
 process is set to the group_leader of the calling process.
+
 <a name="reg_shared-1"></a>
 <a name="reg_shared-1"></a>
 
 
 ### reg_shared/1 ###
 ### reg_shared/1 ###
 
 
-
 <pre><code>
 <pre><code>
 reg_shared(Key::<a href="#type-key">key()</a>) -&gt; true
 reg_shared(Key::<a href="#type-key">key()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Register a resource, but don't tie it to a particular process.
 Register a resource, but don't tie it to a particular process.
 
 
-
 `reg_shared({c,l,C}) -> reg_shared({c,l,C}, 0).`
 `reg_shared({c,l,C}) -> reg_shared({c,l,C}, 0).`
 `reg_shared({a,l,A}) -> reg_shared({a,l,A}, undefined).`
 `reg_shared({a,l,A}) -> reg_shared({a,l,A}, undefined).`
+
 <a name="reg_shared-2"></a>
 <a name="reg_shared-2"></a>
 
 
 ### reg_shared/2 ###
 ### reg_shared/2 ###
 
 
-
 <pre><code>
 <pre><code>
 reg_shared(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 reg_shared(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Register a resource, but don't tie it to a particular process.
 Register a resource, but don't tie it to a particular process.
 
 
-
-
 Shared resources are all unique. They remain until explicitly unregistered
 Shared resources are all unique. They remain until explicitly unregistered
 (using [`unreg_shared/1`](#unreg_shared-1)). The types of shared resources currently
 (using [`unreg_shared/1`](#unreg_shared-1)). The types of shared resources currently
 supported are `counter` and `aggregated counter`. In listings and query
 supported are `counter` and `aggregated counter`. In listings and query
@@ -1372,110 +1222,92 @@ results, shared resources appear as other similar resources, except that
 `Pid == shared`. To wit, update_counter({c,l,myCounter}, shared, 1) would
 `Pid == shared`. To wit, update_counter({c,l,myCounter}, shared, 1) would
 increment the shared counter `myCounter` with 1, provided it exists.
 increment the shared counter `myCounter` with 1, provided it exists.
 
 
-
 A shared aggregated counter will track updates in exactly the same way as
 A shared aggregated counter will track updates in exactly the same way as
 an aggregated counter which is owned by a process.
 an aggregated counter which is owned by a process.
+
 <a name="reg_shared-3"></a>
 <a name="reg_shared-3"></a>
 
 
 ### reg_shared/3 ###
 ### reg_shared/3 ###
 
 
 `reg_shared(Key, Value, Attrs) -> any()`
 `reg_shared(Key, Value, Attrs) -> any()`
 
 
-
 <a name="register_name-2"></a>
 <a name="register_name-2"></a>
 
 
 ### register_name/2 ###
 ### register_name/2 ###
 
 
-
 <pre><code>
 <pre><code>
 register_name(Name::<a href="#type-key">key()</a>, Pid::pid()) -&gt; yes | no
 register_name(Name::<a href="#type-key">key()</a>, Pid::pid()) -&gt; yes | no
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Behaviour support callback
 Behaviour support callback
+
 <a name="reset_counter-1"></a>
 <a name="reset_counter-1"></a>
 
 
 ### reset_counter/1 ###
 ### reset_counter/1 ###
 
 
-
 <pre><code>
 <pre><code>
 reset_counter(Key) -&gt; {ValueBefore, ValueAfter}
 reset_counter(Key) -&gt; {ValueBefore, ValueAfter}
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Key = {c, Scope, Name} | {n, Scope, Name}</code></li><li><code>Scope = l | g</code></li><li><code>ValueBefore = integer()</code></li><li><code>ValueAfter = integer()</code></li></ul>
 <ul class="definitions"><li><code>Key = {c, Scope, Name} | {n, Scope, Name}</code></li><li><code>Scope = l | g</code></li><li><code>ValueBefore = integer()</code></li><li><code>ValueAfter = integer()</code></li></ul>
 
 
-
 Reads and resets a counter in a "thread-safe" way
 Reads and resets a counter in a "thread-safe" way
 
 
-
-
 This function reads the current value of a counter and then resets it to its
 This function reads the current value of a counter and then resets it to its
 initial value. The reset operation is done using [`update_counter/2`](#update_counter-2),
 initial value. The reset operation is done using [`update_counter/2`](#update_counter-2),
 which allows for concurrent calls to [`update_counter/2`](#update_counter-2) without losing
 which allows for concurrent calls to [`update_counter/2`](#update_counter-2) without losing
 updates. Aggregated counters are updated accordingly.
 updates. Aggregated counters are updated accordingly.
 
 
-
 If `Key` refers to a unique name, the operation will depend on the value
 If `Key` refers to a unique name, the operation will depend on the value
 part of the registration being an integer(). While non-integer values are
 part of the registration being an integer(). While non-integer values are
 not permitted at all for counter objects, it is the user's responsibility to
 not permitted at all for counter objects, it is the user's responsibility to
 ensure that a name, on which `reset_counter/1` is to be performed, has the
 ensure that a name, on which `reset_counter/1` is to be performed, has the
 appropriate value type.
 appropriate value type.
+
 <a name="select-1"></a>
 <a name="select-1"></a>
 
 
 ### select/1 ###
 ### select/1 ###
 
 
-
 <pre><code>
 <pre><code>
 select(Continuation::Arg) -&gt; [Match] | {[Match], Continuation} | '$end_of_table'
 select(Continuation::Arg) -&gt; [Match] | {[Match], Continuation} | '$end_of_table'
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Arg = Continuation | <a href="#type-sel_pattern">sel_pattern()</a></code></li><li><code>Match = {Key, Pid, Value}</code></li></ul>
 <ul class="definitions"><li><code>Arg = Continuation | <a href="#type-sel_pattern">sel_pattern()</a></code></li><li><code>Match = {Key, Pid, Value}</code></li></ul>
 
 
-
 Perform a select operation on the process registry
 Perform a select operation on the process registry
 
 
-
-
 When Arg = Contination, resume a gproc:select/1 operation
 When Arg = Contination, resume a gproc:select/1 operation
 (see [ets:select/1](http://www.erlang.org/doc/man/ets.html#select-1)
 (see [ets:select/1](http://www.erlang.org/doc/man/ets.html#select-1)
 
 
-
-
 When Arg = <code><a href="#type-sel_pattern">sel_pattern()</a></code>, this function executes a select operation,
 When Arg = <code><a href="#type-sel_pattern">sel_pattern()</a></code>, this function executes a select operation,
 emulating ets:select/1
 emulating ets:select/1
 
 
-
-
 [`select/2`](#select-2) offers the opportunity to narrow the search
 [`select/2`](#select-2) offers the opportunity to narrow the search
 (by limiting to only global or local scope, or a single type of object).
 (by limiting to only global or local scope, or a single type of object).
 When only a pattern as single argument is given, both global and local scope,
 When only a pattern as single argument is given, both global and local scope,
 as well as all types of object can be searched. Note that the pattern may
 as well as all types of object can be searched. Note that the pattern may
 still limit the select operation so that scanning the entire table is avoided.
 still limit the select operation so that scanning the entire table is avoided.
 
 
-
 The physical representation in the registry may differ from the above,
 The physical representation in the registry may differ from the above,
 but the select patterns are transformed appropriately. The logical
 but the select patterns are transformed appropriately. The logical
 representation for the gproc select operations is given by
 representation for the gproc select operations is given by
 <code><a href="#type-headpat">headpat()</a></code>.
 <code><a href="#type-headpat">headpat()</a></code>.
+
 <a name="select-2"></a>
 <a name="select-2"></a>
 
 
 ### select/2 ###
 ### select/2 ###
 
 
-
 <pre><code>
 <pre><code>
 select(Context::<a href="#type-sel_context">sel_context()</a>, Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [{Key, Pid, Value}]
 select(Context::<a href="#type-sel_context">sel_context()</a>, Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [{Key, Pid, Value}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Perform a select operation with limited context on the process registry
 Perform a select operation with limited context on the process registry
 
 
-
-
 The physical representation in the registry may differ from the above,
 The physical representation in the registry may differ from the above,
 but the select patterns are transformed appropriately.
 but the select patterns are transformed appropriately.
 
 
-
 Note that limiting the context is just a convenience function, allowing you
 Note that limiting the context is just a convenience function, allowing you
 to write a simpler select pattern and still avoid searching the entire
 to write a simpler select pattern and still avoid searching the entire
 registry. Whenever variables are used in the head pattern, this will result
 registry. Whenever variables are used in the head pattern, this will result
@@ -1484,235 +1316,203 @@ in a wider scan, even if the values are restricted through a guard (e.g.
 will count as a wild pattern on the key and result in a full scan).
 will count as a wild pattern on the key and result in a full scan).
 In this case, specifying a Context will allow gproc to perform some
 In this case, specifying a Context will allow gproc to perform some
 variable substitution and ensure that the scan is limited.
 variable substitution and ensure that the scan is limited.
+
 <a name="select-3"></a>
 <a name="select-3"></a>
 
 
 ### select/3 ###
 ### select/3 ###
 
 
-
 <pre><code>
 <pre><code>
 select(Context::<a href="#type-context">context()</a>, Pat::<a href="#type-sel_patten">sel_patten()</a>, Limit::integer()) -&gt; {[Match], Continuation} | '$end_of_table'
 select(Context::<a href="#type-context">context()</a>, Pat::<a href="#type-sel_patten">sel_patten()</a>, Limit::integer()) -&gt; {[Match], Continuation} | '$end_of_table'
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Like [`select/2`](#select-2) but returns Limit objects at a time.
 Like [`select/2`](#select-2) but returns Limit objects at a time.
 
 
-
 See [`http://www.erlang.org/doc/man/ets.html#select-3`](http://www.erlang.org/doc/man/ets.html#select-3).
 See [`http://www.erlang.org/doc/man/ets.html#select-3`](http://www.erlang.org/doc/man/ets.html#select-3).
+
 <a name="select_count-1"></a>
 <a name="select_count-1"></a>
 
 
 ### select_count/1 ###
 ### select_count/1 ###
 
 
-
 <pre><code>
 <pre><code>
 select_count(Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [<a href="#type-sel_object">sel_object()</a>]
 select_count(Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [<a href="#type-sel_object">sel_object()</a>]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`select_count(all, Pat)`](#select_count-2).
 Equivalent to [`select_count(all, Pat)`](#select_count-2).
+
 <a name="select_count-2"></a>
 <a name="select_count-2"></a>
 
 
 ### select_count/2 ###
 ### select_count/2 ###
 
 
-
 <pre><code>
 <pre><code>
 select_count(Context::<a href="#type-context">context()</a>, Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [{Key, Pid, Value}]
 select_count(Context::<a href="#type-context">context()</a>, Pat::<a href="#type-sel_pattern">sel_pattern()</a>) -&gt; [{Key, Pid, Value}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Perform a select_count operation on the process registry.
 Perform a select_count operation on the process registry.
 
 
-
 The physical representation in the registry may differ from the above,
 The physical representation in the registry may differ from the above,
 but the select patterns are transformed appropriately.
 but the select patterns are transformed appropriately.
+
 <a name="send-2"></a>
 <a name="send-2"></a>
 
 
 ### send/2 ###
 ### send/2 ###
 
 
-
 <pre><code>
 <pre><code>
 send(Key::<a href="#type-process">process()</a> | <a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 send(Key::<a href="#type-process">process()</a> | <a href="#type-key">key()</a>, Msg::any()) -&gt; Msg
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Sends a message to the process, or processes, corresponding to Key.
 Sends a message to the process, or processes, corresponding to Key.
 
 
-
-
 If Key belongs to a unique object (name or aggregated counter), this
 If Key belongs to a unique object (name or aggregated counter), this
 function will send a message to the corresponding process, or fail if there
 function will send a message to the corresponding process, or fail if there
 is no such process. If Key is for a non-unique object type (counter or
 is no such process. If Key is for a non-unique object type (counter or
 property), Msg will be send to all processes that have such an object.
 property), Msg will be send to all processes that have such an object.
 
 
-
 Key can also be anything that the erlang:send/2, or '!' operator accepts as a process
 Key can also be anything that the erlang:send/2, or '!' operator accepts as a process
 identifier, namely a pid(), an atom(), or `{Name::atom(), Node::atom()}`.
 identifier, namely a pid(), an atom(), or `{Name::atom(), Node::atom()}`.
+
 <a name="set_attributes-2"></a>
 <a name="set_attributes-2"></a>
 
 
 ### set_attributes/2 ###
 ### set_attributes/2 ###
 
 
-
 <pre><code>
 <pre><code>
 set_attributes(Key::<a href="#type-key">key()</a>, Props::[{atom(), any()}]) -&gt; true
 set_attributes(Key::<a href="#type-key">key()</a>, Props::[{atom(), any()}]) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Add/modify `{Key, Value}` attributes associated with a registration.
 Add/modify `{Key, Value}` attributes associated with a registration.
 
 
-
-
 Gproc registration objects can have `{Key, Value}` attributes associated with
 Gproc registration objects can have `{Key, Value}` attributes associated with
 them. These are stored in a way that doesn't affect the cost of name lookup.
 them. These are stored in a way that doesn't affect the cost of name lookup.
 
 
-
 Attributs can be retrieved using `gproc:get_attribute/3` or
 Attributs can be retrieved using `gproc:get_attribute/3` or
 `gproc:get_attributes/2`.
 `gproc:get_attributes/2`.
+
 <a name="set_attributes_shared-2"></a>
 <a name="set_attributes_shared-2"></a>
 
 
 ### set_attributes_shared/2 ###
 ### set_attributes_shared/2 ###
 
 
-
 <pre><code>
 <pre><code>
 set_attributes_shared(Key::<a href="#type-key">key()</a>, Props::[{K, V}]) -&gt; true
 set_attributes_shared(Key::<a href="#type-key">key()</a>, Props::[{K, V}]) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Add/modify `{Key, Value}` attributes associated with a shared registration.
 Add/modify `{Key, Value}` attributes associated with a shared registration.
 
 
-
-
 Gproc registration objects can have `{Key, Value}` attributes associated with
 Gproc registration objects can have `{Key, Value}` attributes associated with
 them. These are stored in a way that doesn't affect the cost of name lookup.
 them. These are stored in a way that doesn't affect the cost of name lookup.
 
 
-
 Attributes can be retrieved using `gproc:get_attribute/3` or
 Attributes can be retrieved using `gproc:get_attribute/3` or
 `gproc:get_attributes/2`.
 `gproc:get_attributes/2`.
+
 <a name="set_env-5"></a>
 <a name="set_env-5"></a>
 
 
 ### set_env/5 ###
 ### set_env/5 ###
 
 
-
 <pre><code>
 <pre><code>
 set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Value::term(), Strategy) -&gt; Value
 set_env(Scope::<a href="#type-scope">scope()</a>, App::atom(), Key::atom(), Value::term(), Strategy) -&gt; Value
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Strategy = [Alternative]</code></li><li><code>Alternative = app_env | os_env | {os_env, VAR} | {mnesia, ActivityType, Oid, Pos}</code></li></ul>
 <ul class="definitions"><li><code>Strategy = [Alternative]</code></li><li><code>Alternative = app_env | os_env | {os_env, VAR} | {mnesia, ActivityType, Oid, Pos}</code></li></ul>
 
 
-
 Updates the cached value as well as underlying environment.
 Updates the cached value as well as underlying environment.
 
 
-
-
 This function should be exercised with caution, as it affects the larger
 This function should be exercised with caution, as it affects the larger
 environment outside gproc. This function modifies the cached value, and then
 environment outside gproc. This function modifies the cached value, and then
 proceeds to update the underlying environment (OS environment variable or
 proceeds to update the underlying environment (OS environment variable or
 application environment variable).
 application environment variable).
 
 
-
 When the `mnesia` alternative is used, gproc will try to update any existing
 When the `mnesia` alternative is used, gproc will try to update any existing
 object, changing only the `Pos` position. If no such object exists, it will
 object, changing only the `Pos` position. If no such object exists, it will
 create a new object, setting any other attributes (except `Pos` and the key)
 create a new object, setting any other attributes (except `Pos` and the key)
 to `undefined`.
 to `undefined`.
+
 <a name="set_value-2"></a>
 <a name="set_value-2"></a>
 
 
 ### set_value/2 ###
 ### set_value/2 ###
 
 
-
 <pre><code>
 <pre><code>
 set_value(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 set_value(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Sets the value of the registration given by Key
 Sets the value of the registration given by Key
 
 
-
-
 Key is assumed to exist and belong to the calling process.
 Key is assumed to exist and belong to the calling process.
 If it doesn't, this function will exit.
 If it doesn't, this function will exit.
 
 
-
 Value can be any term, unless the object is a counter, in which case
 Value can be any term, unless the object is a counter, in which case
 it must be an integer.
 it must be an integer.
+
 <a name="set_value_shared-2"></a>
 <a name="set_value_shared-2"></a>
 
 
 ### set_value_shared/2 ###
 ### set_value_shared/2 ###
 
 
-
 <pre><code>
 <pre><code>
 set_value_shared(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 set_value_shared(Key::<a href="#type-key">key()</a>, Value) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Sets the value of the shared registration given by Key
 Sets the value of the shared registration given by Key
 
 
-
-
 Key is assumed to exist as a shared entity.
 Key is assumed to exist as a shared entity.
 If it doesn't, this function will exit.
 If it doesn't, this function will exit.
 
 
-
 Value can be any term, unless the object is a counter, in which case
 Value can be any term, unless the object is a counter, in which case
 it must be an integer.
 it must be an integer.
+
 <a name="start_link-0"></a>
 <a name="start_link-0"></a>
 
 
 ### start_link/0 ###
 ### start_link/0 ###
 
 
-
 <pre><code>
 <pre><code>
 start_link() -&gt; {ok, pid()}
 start_link() -&gt; {ok, pid()}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Starts the gproc server.
 Starts the gproc server.
 
 
-
 This function is intended to be called from gproc_sup, as part of
 This function is intended to be called from gproc_sup, as part of
 starting the gproc application.
 starting the gproc application.
+
 <a name="table-0"></a>
 <a name="table-0"></a>
 
 
 ### table/0 ###
 ### table/0 ###
 
 
-
 <pre><code>
 <pre><code>
 table() -&gt; any()
 table() -&gt; any()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`table({all, all})`](#table-1).
 Equivalent to [`table({all, all})`](#table-1).
+
 <a name="table-1"></a>
 <a name="table-1"></a>
 
 
 ### table/1 ###
 ### table/1 ###
 
 
-
 <pre><code>
 <pre><code>
 table(Context::<a href="#type-context">context()</a>) -&gt; any()
 table(Context::<a href="#type-context">context()</a>) -&gt; any()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`table(Context, [])`](#table-2).
 Equivalent to [`table(Context, [])`](#table-2).
+
 <a name="table-2"></a>
 <a name="table-2"></a>
 
 
 ### table/2 ###
 ### table/2 ###
 
 
-
 <pre><code>
 <pre><code>
 table(Context::<a href="#type-context">context()</a>, Opts) -&gt; any()
 table(Context::<a href="#type-context">context()</a>, Opts) -&gt; any()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 QLC table generator for the gproc registry.
 QLC table generator for the gproc registry.
 Context specifies which subset of the registry should be queried.
 Context specifies which subset of the registry should be queried.
 See [`http://www.erlang.org/doc/man/qlc.html`](http://www.erlang.org/doc/man/qlc.html).
 See [`http://www.erlang.org/doc/man/qlc.html`](http://www.erlang.org/doc/man/qlc.html).
 
 
-
 NOTE: By default, the gproc table generator will not filter out entries
 NOTE: By default, the gproc table generator will not filter out entries
 belonging to processes that have just died, but which have yet to be cleared
 belonging to processes that have just died, but which have yet to be cleared
 out of the registry. Use the option `check_pids` (or `{check_pids, true}`)
 out of the registry. Use the option `check_pids` (or `{check_pids, true}`)
@@ -1725,24 +1525,24 @@ entries in the list by the time your program processes it.
 
 
 ### unreg/1 ###
 ### unreg/1 ###
 
 
-
 <pre><code>
 <pre><code>
 unreg(Key::<a href="#type-key">key()</a>) -&gt; true
 unreg(Key::<a href="#type-key">key()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Unregister a name or property.
 Unregister a name or property.
+
 <a name="unreg_shared-1"></a>
 <a name="unreg_shared-1"></a>
 
 
 ### unreg_shared/1 ###
 ### unreg_shared/1 ###
 
 
-
 <pre><code>
 <pre><code>
 unreg_shared(Key::<a href="#type-key">key()</a>) -&gt; true
 unreg_shared(Key::<a href="#type-key">key()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Unregister a shared resource.
 Unregister a shared resource.
+
 <a name="unregister_name-1"></a>
 <a name="unregister_name-1"></a>
 
 
 ### unregister_name/1 ###
 ### unregister_name/1 ###
@@ -1750,108 +1550,92 @@ Unregister a shared resource.
 `unregister_name(Key) -> any()`
 `unregister_name(Key) -> any()`
 
 
 Equivalent to `unreg / 1`.
 Equivalent to `unreg / 1`.
+
 <a name="update_counter-2"></a>
 <a name="update_counter-2"></a>
 
 
 ### update_counter/2 ###
 ### update_counter/2 ###
 
 
-
 <pre><code>
 <pre><code>
 update_counter(Key::<a href="#type-key">key()</a>, Incr::<a href="#type-increment">increment()</a>) -&gt; integer()
 update_counter(Key::<a href="#type-key">key()</a>, Incr::<a href="#type-increment">increment()</a>) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Updates the counter registered as Key for the current process.
 Updates the counter registered as Key for the current process.
 
 
-
-
 This function works almost exactly like ets:update_counter/3
 This function works almost exactly like ets:update_counter/3
 (see [`http://www.erlang.org/doc/man/ets.html#update_counter-3`](http://www.erlang.org/doc/man/ets.html#update_counter-3)), but
 (see [`http://www.erlang.org/doc/man/ets.html#update_counter-3`](http://www.erlang.org/doc/man/ets.html#update_counter-3)), but
 will fail if the type of object referred to by Key is not a counter or
 will fail if the type of object referred to by Key is not a counter or
 a unique name (update_counter/2 can be performed on names as well, but they
 a unique name (update_counter/2 can be performed on names as well, but they
 do not count as counter objects, and do not affect aggregated counters).
 do not count as counter objects, and do not affect aggregated counters).
 
 
-
-
 Aggregated counters with the same name will be updated automatically.
 Aggregated counters with the same name will be updated automatically.
 The `UpdateOp` patterns are the same as for `ets:update_counter/3`, except
 The `UpdateOp` patterns are the same as for `ets:update_counter/3`, except
 that the position is omitted; in gproc, the value position is always `3`.
 that the position is omitted; in gproc, the value position is always `3`.
 
 
-
 If `Key` refers to a unique name, the operation will depend on the value
 If `Key` refers to a unique name, the operation will depend on the value
 part of the registration being an integer(). While non-integer values are
 part of the registration being an integer(). While non-integer values are
 not permitted at all for counter objects, it is the user's responsibility to
 not permitted at all for counter objects, it is the user's responsibility to
 ensure that a name, on which `update_counter/2` is to be performed, has the
 ensure that a name, on which `update_counter/2` is to be performed, has the
 appropriate value type.
 appropriate value type.
+
 <a name="update_counter-3"></a>
 <a name="update_counter-3"></a>
 
 
 ### update_counter/3 ###
 ### update_counter/3 ###
 
 
 `update_counter(Key, Pid, Incr) -> any()`
 `update_counter(Key, Pid, Incr) -> any()`
 
 
-
 <a name="update_counters-2"></a>
 <a name="update_counters-2"></a>
 
 
 ### update_counters/2 ###
 ### update_counters/2 ###
 
 
-
 <pre><code>
 <pre><code>
 update_counters(X1::<a href="#type-scope">scope()</a>, Cs::[{<a href="#type-key">key()</a>, pid(), <a href="#type-increment">increment()</a>}]) -&gt; [{<a href="#type-key">key()</a>, pid(), integer()}]
 update_counters(X1::<a href="#type-scope">scope()</a>, Cs::[{<a href="#type-key">key()</a>, pid(), <a href="#type-increment">increment()</a>}]) -&gt; [{<a href="#type-key">key()</a>, pid(), integer()}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Update a list of counters
 Update a list of counters
 
 
-
-
 This function is not atomic, except (in a sense) for global counters. For local counters,
 This function is not atomic, except (in a sense) for global counters. For local counters,
 it is more of a convenience function. For global counters, it is much more efficient
 it is more of a convenience function. For global counters, it is much more efficient
 than calling `gproc:update_counter/2` for each individual counter.
 than calling `gproc:update_counter/2` for each individual counter.
 
 
-
 The return value is the corresponding list of `[{Counter, Pid, NewValue}]`.
 The return value is the corresponding list of `[{Counter, Pid, NewValue}]`.
+
 <a name="update_shared_counter-2"></a>
 <a name="update_shared_counter-2"></a>
 
 
 ### update_shared_counter/2 ###
 ### update_shared_counter/2 ###
 
 
-
 <pre><code>
 <pre><code>
 update_shared_counter(Key::<a href="#type-key">key()</a>, Incr) -&gt; integer() | [integer()]
 update_shared_counter(Key::<a href="#type-key">key()</a>, Incr) -&gt; integer() | [integer()]
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Incr = IncrVal | UpdateOp | [UpdateOp]</code></li><li><code>UpdateOp = IncrVal | {IncrVal, Threshold, SetValue}</code></li><li><code>IncrVal = integer()</code></li></ul>
 <ul class="definitions"><li><code>Incr = IncrVal | UpdateOp | [UpdateOp]</code></li><li><code>UpdateOp = IncrVal | {IncrVal, Threshold, SetValue}</code></li><li><code>IncrVal = integer()</code></li></ul>
 
 
-
 Updates the shared counter registered as Key.
 Updates the shared counter registered as Key.
 
 
-
-
 This function works almost exactly like ets:update_counter/3
 This function works almost exactly like ets:update_counter/3
 (see [`http://www.erlang.org/doc/man/ets.html#update_counter-3`](http://www.erlang.org/doc/man/ets.html#update_counter-3)), but
 (see [`http://www.erlang.org/doc/man/ets.html#update_counter-3`](http://www.erlang.org/doc/man/ets.html#update_counter-3)), but
 will fail if the type of object referred to by Key is not a counter.
 will fail if the type of object referred to by Key is not a counter.
 
 
-
 Aggregated counters with the same name will be updated automatically.
 Aggregated counters with the same name will be updated automatically.
 The `UpdateOp` patterns are the same as for `ets:update_counter/3`, except
 The `UpdateOp` patterns are the same as for `ets:update_counter/3`, except
 that the position is omitted; in gproc, the value position is always `3`.
 that the position is omitted; in gproc, the value position is always `3`.
+
 <a name="where-1"></a>
 <a name="where-1"></a>
 
 
 ### where/1 ###
 ### where/1 ###
 
 
-
 <pre><code>
 <pre><code>
 where(Key::<a href="#type-key">key()</a>) -&gt; pid() | undefined
 where(Key::<a href="#type-key">key()</a>) -&gt; pid() | undefined
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Returns the pid registered as Key
 Returns the pid registered as Key
 
 
-
 The type of registration must be either name or aggregated counter.
 The type of registration must be either name or aggregated counter.
 Otherwise this function will raise a `badarg` exception.
 Otherwise this function will raise a `badarg` exception.
 Use [`lookup_pids/1`](#lookup_pids-1) in these cases.
 Use [`lookup_pids/1`](#lookup_pids-1) in these cases.
+
 <a name="whereis_name-1"></a>
 <a name="whereis_name-1"></a>
 
 
 ### whereis_name/1 ###
 ### whereis_name/1 ###
@@ -1859,24 +1643,23 @@ Use [`lookup_pids/1`](#lookup_pids-1) in these cases.
 `whereis_name(Key) -> any()`
 `whereis_name(Key) -> any()`
 
 
 Equivalent to `where / 1`.
 Equivalent to `where / 1`.
+
 <a name="wide_await-3"></a>
 <a name="wide_await-3"></a>
 
 
 ### wide_await/3 ###
 ### wide_await/3 ###
 
 
-
 <pre><code>
 <pre><code>
 wide_await(Nodes::[node()], Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 wide_await(Nodes::[node()], Key::<a href="#type-key">key()</a>, Timeout) -&gt; {pid(), Value}
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Timeout = integer() | infinity</code></li></ul>
 <ul class="definitions"><li><code>Timeout = integer() | infinity</code></li></ul>
 
 
-
 Wait for a local name to be registered on any of `Nodes`.
 Wait for a local name to be registered on any of `Nodes`.
 This function works rather like [`await/2`](#await-2), but queries all nodes in
 This function works rather like [`await/2`](#await-2), but queries all nodes in
 the `Nodes` list at the same time. The first node to respond with a
 the `Nodes` list at the same time. The first node to respond with a
 process registered as `Key` will provide the result. Other results are
 process registered as `Key` will provide the result. Other results are
 ignored. `Key` must be a unique name with local scope, i.e. `{n,l,Name}`.
 ignored. `Key` must be a unique name with local scope, i.e. `{n,l,Name}`.
 
 
-
 An exception is thrown upon timeout, or if no node can be reached (if gproc is
 An exception is thrown upon timeout, or if no node can be reached (if gproc is
 not running on a given node, this is treated the same as the node being down).
 not running on a given node, this is treated the same as the node being down).
+

+ 1 - 3
doc/gproc_app.md

@@ -5,6 +5,7 @@
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
 __Behaviours:__ [`application`](application.md).
 __Behaviours:__ [`application`](application.md).
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -23,18 +24,15 @@ __Behaviours:__ [`application`](application.md).
 
 
 `start() -> any()`
 `start() -> any()`
 
 
-
 <a name="start-2"></a>
 <a name="start-2"></a>
 
 
 ### start/2 ###
 ### start/2 ###
 
 
 `start(Type, StartArgs) -> any()`
 `start(Type, StartArgs) -> any()`
 
 
-
 <a name="stop-1"></a>
 <a name="stop-1"></a>
 
 
 ### stop/1 ###
 ### stop/1 ###
 
 
 `stop(State) -> any()`
 `stop(State) -> any()`
 
 
-

+ 2 - 10
doc/gproc_bcast.md

@@ -5,17 +5,16 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Gproc message broadcast server
 Gproc message broadcast server
 This module is used to support gproc:bcast(Key, Msg).
 This module is used to support gproc:bcast(Key, Msg).
+
 __Behaviours:__ [`gen_server`](gen_server.md).
 __Behaviours:__ [`gen_server`](gen_server.md).
 
 
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
-
-
 gproc:bcast/2 allows for e.g. distributed publish/subscribe, without
 gproc:bcast/2 allows for e.g. distributed publish/subscribe, without
 having to resort to global property registration.
 having to resort to global property registration.
 To ensure that erlang's message ordering guarantees are kept, all sends
 To ensure that erlang's message ordering guarantees are kept, all sends
@@ -37,46 +36,39 @@ are channeled through a broadcast server on each node.<a name="index"></a>
 
 
 `code_change(X1, S, X3) -> any()`
 `code_change(X1, S, X3) -> any()`
 
 
-
 <a name="handle_call-3"></a>
 <a name="handle_call-3"></a>
 
 
 ### handle_call/3 ###
 ### handle_call/3 ###
 
 
 `handle_call(X1, X2, S) -> any()`
 `handle_call(X1, X2, S) -> any()`
 
 
-
 <a name="handle_cast-2"></a>
 <a name="handle_cast-2"></a>
 
 
 ### handle_cast/2 ###
 ### handle_cast/2 ###
 
 
 `handle_cast(X1, S) -> any()`
 `handle_cast(X1, S) -> any()`
 
 
-
 <a name="handle_info-2"></a>
 <a name="handle_info-2"></a>
 
 
 ### handle_info/2 ###
 ### handle_info/2 ###
 
 
 `handle_info(X1, S) -> any()`
 `handle_info(X1, S) -> any()`
 
 
-
 <a name="init-1"></a>
 <a name="init-1"></a>
 
 
 ### init/1 ###
 ### init/1 ###
 
 
 `init(X1) -> any()`
 `init(X1) -> any()`
 
 
-
 <a name="start_link-0"></a>
 <a name="start_link-0"></a>
 
 
 ### start_link/0 ###
 ### start_link/0 ###
 
 
 `start_link() -> any()`
 `start_link() -> any()`
 
 
-
 <a name="terminate-2"></a>
 <a name="terminate-2"></a>
 
 
 ### terminate/2 ###
 ### terminate/2 ###
 
 
 `terminate(X1, X2) -> any()`
 `terminate(X1, X2) -> any()`
 
 
-

+ 6 - 43
doc/gproc_dist.md

@@ -5,19 +5,20 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Extended process registry.
 Extended process registry.
+
 __Behaviours:__ [`gen_leader`](gen_leader.md).
 __Behaviours:__ [`gen_leader`](gen_leader.md).
 
 
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
 This module implements an extended process registry
 This module implements an extended process registry
 
 
-
 For a detailed description, see gproc/doc/erlang07-wiger.pdf.
 For a detailed description, see gproc/doc/erlang07-wiger.pdf.
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -41,247 +42,214 @@ Scope = l | g (global or local).</td></tr><tr><td valign="top"><a href="#reg_or_
 
 
 `code_change(FromVsn, S, Extra, E) -> any()`
 `code_change(FromVsn, S, Extra, E) -> any()`
 
 
-
 <a name="demonitor-2"></a>
 <a name="demonitor-2"></a>
 
 
 ### demonitor/2 ###
 ### demonitor/2 ###
 
 
 `demonitor(Key, Ref) -> any()`
 `demonitor(Key, Ref) -> any()`
 
 
-
 <a name="elected-2"></a>
 <a name="elected-2"></a>
 
 
 ### elected/2 ###
 ### elected/2 ###
 
 
 `elected(S, E) -> any()`
 `elected(S, E) -> any()`
 
 
-
 <a name="elected-3"></a>
 <a name="elected-3"></a>
 
 
 ### elected/3 ###
 ### elected/3 ###
 
 
 `elected(S, E, Node) -> any()`
 `elected(S, E, Node) -> any()`
 
 
-
 <a name="from_leader-3"></a>
 <a name="from_leader-3"></a>
 
 
 ### from_leader/3 ###
 ### from_leader/3 ###
 
 
 `from_leader(Ops, S, E) -> any()`
 `from_leader(Ops, S, E) -> any()`
 
 
-
 <a name="get_leader-0"></a>
 <a name="get_leader-0"></a>
 
 
 ### get_leader/0 ###
 ### get_leader/0 ###
 
 
-
 <pre><code>
 <pre><code>
 get_leader() -&gt; node()
 get_leader() -&gt; node()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Returns the node of the current gproc leader.
 Returns the node of the current gproc leader.
+
 <a name="give_away-2"></a>
 <a name="give_away-2"></a>
 
 
 ### give_away/2 ###
 ### give_away/2 ###
 
 
 `give_away(Key, To) -> any()`
 `give_away(Key, To) -> any()`
 
 
-
 <a name="handle_DOWN-3"></a>
 <a name="handle_DOWN-3"></a>
 
 
 ### handle_DOWN/3 ###
 ### handle_DOWN/3 ###
 
 
 `handle_DOWN(Node, S, E) -> any()`
 `handle_DOWN(Node, S, E) -> any()`
 
 
-
 <a name="handle_call-4"></a>
 <a name="handle_call-4"></a>
 
 
 ### handle_call/4 ###
 ### handle_call/4 ###
 
 
 `handle_call(X1, X2, S, E) -> any()`
 `handle_call(X1, X2, S, E) -> any()`
 
 
-
 <a name="handle_cast-3"></a>
 <a name="handle_cast-3"></a>
 
 
 ### handle_cast/3 ###
 ### handle_cast/3 ###
 
 
 `handle_cast(Msg, S, X3) -> any()`
 `handle_cast(Msg, S, X3) -> any()`
 
 
-
 <a name="handle_info-2"></a>
 <a name="handle_info-2"></a>
 
 
 ### handle_info/2 ###
 ### handle_info/2 ###
 
 
 `handle_info(X1, S) -> any()`
 `handle_info(X1, S) -> any()`
 
 
-
 <a name="handle_info-3"></a>
 <a name="handle_info-3"></a>
 
 
 ### handle_info/3 ###
 ### handle_info/3 ###
 
 
 `handle_info(Msg, S, E) -> any()`
 `handle_info(Msg, S, E) -> any()`
 
 
-
 <a name="handle_leader_call-4"></a>
 <a name="handle_leader_call-4"></a>
 
 
 ### handle_leader_call/4 ###
 ### handle_leader_call/4 ###
 
 
 `handle_leader_call(X1, From, State, E) -> any()`
 `handle_leader_call(X1, From, State, E) -> any()`
 
 
-
 <a name="handle_leader_cast-3"></a>
 <a name="handle_leader_cast-3"></a>
 
 
 ### handle_leader_cast/3 ###
 ### handle_leader_cast/3 ###
 
 
 `handle_leader_cast(X1, S, E) -> any()`
 `handle_leader_cast(X1, S, E) -> any()`
 
 
-
 <a name="init-1"></a>
 <a name="init-1"></a>
 
 
 ### init/1 ###
 ### init/1 ###
 
 
 `init(Opts) -> any()`
 `init(Opts) -> any()`
 
 
-
 <a name="leader_call-1"></a>
 <a name="leader_call-1"></a>
 
 
 ### leader_call/1 ###
 ### leader_call/1 ###
 
 
 `leader_call(Req) -> any()`
 `leader_call(Req) -> any()`
 
 
-
 <a name="leader_cast-1"></a>
 <a name="leader_cast-1"></a>
 
 
 ### leader_cast/1 ###
 ### leader_cast/1 ###
 
 
 `leader_cast(Msg) -> any()`
 `leader_cast(Msg) -> any()`
 
 
-
 <a name="monitor-2"></a>
 <a name="monitor-2"></a>
 
 
 ### monitor/2 ###
 ### monitor/2 ###
 
 
 `monitor(Key, Type) -> any()`
 `monitor(Key, Type) -> any()`
 
 
-
 <a name="mreg-2"></a>
 <a name="mreg-2"></a>
 
 
 ### mreg/2 ###
 ### mreg/2 ###
 
 
 `mreg(T, KVL) -> any()`
 `mreg(T, KVL) -> any()`
 
 
-
 <a name="munreg-2"></a>
 <a name="munreg-2"></a>
 
 
 ### munreg/2 ###
 ### munreg/2 ###
 
 
 `munreg(T, Keys) -> any()`
 `munreg(T, Keys) -> any()`
 
 
-
 <a name="reg-1"></a>
 <a name="reg-1"></a>
 
 
 ### reg/1 ###
 ### reg/1 ###
 
 
 `reg(Key) -> any()`
 `reg(Key) -> any()`
 
 
-
 <a name="reg-3"></a>
 <a name="reg-3"></a>
 
 
 ### reg/3 ###
 ### reg/3 ###
 
 
 `reg(Key, Value, Attrs) -> any()`
 `reg(Key, Value, Attrs) -> any()`
 
 
-
 Class = n  - unique name
 Class = n  - unique name
 | p  - non-unique property
 | p  - non-unique property
 | c  - counter
 | c  - counter
 | a  - aggregated counter
 | a  - aggregated counter
 Scope = l | g (global or local)
 Scope = l | g (global or local)
+
 <a name="reg_or_locate-3"></a>
 <a name="reg_or_locate-3"></a>
 
 
 ### reg_or_locate/3 ###
 ### reg_or_locate/3 ###
 
 
 `reg_or_locate(Key, Value, Pid) -> any()`
 `reg_or_locate(Key, Value, Pid) -> any()`
 
 
-
 <a name="reg_shared-3"></a>
 <a name="reg_shared-3"></a>
 
 
 ### reg_shared/3 ###
 ### reg_shared/3 ###
 
 
 `reg_shared(Key, Value, Attrs) -> any()`
 `reg_shared(Key, Value, Attrs) -> any()`
 
 
-
 <a name="reset_counter-1"></a>
 <a name="reset_counter-1"></a>
 
 
 ### reset_counter/1 ###
 ### reset_counter/1 ###
 
 
 `reset_counter(Key) -> any()`
 `reset_counter(Key) -> any()`
 
 
-
 <a name="set_attributes-2"></a>
 <a name="set_attributes-2"></a>
 
 
 ### set_attributes/2 ###
 ### set_attributes/2 ###
 
 
 `set_attributes(Key, Attrs) -> any()`
 `set_attributes(Key, Attrs) -> any()`
 
 
-
 <a name="set_attributes_shared-2"></a>
 <a name="set_attributes_shared-2"></a>
 
 
 ### set_attributes_shared/2 ###
 ### set_attributes_shared/2 ###
 
 
 `set_attributes_shared(Key, Attrs) -> any()`
 `set_attributes_shared(Key, Attrs) -> any()`
 
 
-
 <a name="set_value-2"></a>
 <a name="set_value-2"></a>
 
 
 ### set_value/2 ###
 ### set_value/2 ###
 
 
 `set_value(Key, Value) -> any()`
 `set_value(Key, Value) -> any()`
 
 
-
 <a name="set_value_shared-2"></a>
 <a name="set_value_shared-2"></a>
 
 
 ### set_value_shared/2 ###
 ### set_value_shared/2 ###
 
 
 `set_value_shared(Key, Value) -> any()`
 `set_value_shared(Key, Value) -> any()`
 
 
-
 <a name="start_link-0"></a>
 <a name="start_link-0"></a>
 
 
 ### start_link/0 ###
 ### start_link/0 ###
 
 
 `start_link() -> any()`
 `start_link() -> any()`
 
 
-
 <a name="start_link-1"></a>
 <a name="start_link-1"></a>
 
 
 ### start_link/1 ###
 ### start_link/1 ###
 
 
 `start_link(Nodes) -> any()`
 `start_link(Nodes) -> any()`
 
 
-
 <a name="surrendered-3"></a>
 <a name="surrendered-3"></a>
 
 
 ### surrendered/3 ###
 ### surrendered/3 ###
 
 
 `surrendered(State, X2, E) -> any()`
 `surrendered(State, X2, E) -> any()`
 
 
-
 <a name="sync-0"></a>
 <a name="sync-0"></a>
 
 
 ### sync/0 ###
 ### sync/0 ###
 
 
-
 <pre><code>
 <pre><code>
 sync() -&gt; true
 sync() -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Synchronize with the gproc leader
 Synchronize with the gproc leader
 
 
-
 This function can be used to ensure that data has been replicated from the
 This function can be used to ensure that data has been replicated from the
 leader to the current node. It does so by asking the leader to ping all
 leader to the current node. It does so by asking the leader to ping all
 live participating nodes. The call will return `true` when all these nodes
 live participating nodes. The call will return `true` when all these nodes
@@ -290,45 +258,40 @@ during an ongoing sync, the call will fail with a timeout exception.
 (Actually, it should be a `leader_died` exception; more study needed to find
 (Actually, it should be a `leader_died` exception; more study needed to find
 out why gen_leader times out in this situation, rather than reporting that
 out why gen_leader times out in this situation, rather than reporting that
 the leader died.)
 the leader died.)
+
 <a name="terminate-2"></a>
 <a name="terminate-2"></a>
 
 
 ### terminate/2 ###
 ### terminate/2 ###
 
 
 `terminate(Reason, S) -> any()`
 `terminate(Reason, S) -> any()`
 
 
-
 <a name="unreg-1"></a>
 <a name="unreg-1"></a>
 
 
 ### unreg/1 ###
 ### unreg/1 ###
 
 
 `unreg(Key) -> any()`
 `unreg(Key) -> any()`
 
 
-
 <a name="unreg_shared-1"></a>
 <a name="unreg_shared-1"></a>
 
 
 ### unreg_shared/1 ###
 ### unreg_shared/1 ###
 
 
 `unreg_shared(Key) -> any()`
 `unreg_shared(Key) -> any()`
 
 
-
 <a name="update_counter-3"></a>
 <a name="update_counter-3"></a>
 
 
 ### update_counter/3 ###
 ### update_counter/3 ###
 
 
 `update_counter(Key, Pid, Incr) -> any()`
 `update_counter(Key, Pid, Incr) -> any()`
 
 
-
 <a name="update_counters-1"></a>
 <a name="update_counters-1"></a>
 
 
 ### update_counters/1 ###
 ### update_counters/1 ###
 
 
 `update_counters(List) -> any()`
 `update_counters(List) -> any()`
 
 
-
 <a name="update_shared_counter-2"></a>
 <a name="update_shared_counter-2"></a>
 
 
 ### update_shared_counter/2 ###
 ### update_shared_counter/2 ###
 
 
 `update_shared_counter(Key, Incr) -> any()`
 `update_shared_counter(Key, Incr) -> any()`
 
 
-

+ 1 - 2
doc/gproc_info.md

@@ -5,6 +5,7 @@
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -21,10 +22,8 @@ __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 
 
 ### i/0 ###
 ### i/0 ###
 
 
-
 <pre><code>
 <pre><code>
 i() -&gt; ok
 i() -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-

+ 0 - 5
doc/gproc_init.md

@@ -4,7 +4,6 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -21,21 +20,17 @@
 
 
 ### hard_reset/0 ###
 ### hard_reset/0 ###
 
 
-
 <pre><code>
 <pre><code>
 hard_reset() -&gt; ok
 hard_reset() -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 <a name="soft_reset-0"></a>
 <a name="soft_reset-0"></a>
 
 
 ### soft_reset/0 ###
 ### soft_reset/0 ###
 
 
-
 <pre><code>
 <pre><code>
 soft_reset() -&gt; ok
 soft_reset() -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-

+ 3 - 32
doc/gproc_lib.md

@@ -5,17 +5,18 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Extended process registry.
 Extended process registry.
+
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
 This module implements an extended process registry
 This module implements an extended process registry
 
 
-
 For a detailed description, see gproc/doc/erlang07-wiger.pdf.
 For a detailed description, see gproc/doc/erlang07-wiger.pdf.
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -34,201 +35,171 @@ For a detailed description, see gproc/doc/erlang07-wiger.pdf.
 
 
 `add_monitor(T, Pid, Ref, Type) -> any()`
 `add_monitor(T, Pid, Ref, Type) -> any()`
 
 
-
 <a name="await-3"></a>
 <a name="await-3"></a>
 
 
 ### await/3 ###
 ### await/3 ###
 
 
 `await(Key, WPid, From) -> any()`
 `await(Key, WPid, From) -> any()`
 
 
-
 <a name="dbg-1"></a>
 <a name="dbg-1"></a>
 
 
 ### dbg/1 ###
 ### dbg/1 ###
 
 
 `dbg(Mods) -> any()`
 `dbg(Mods) -> any()`
 
 
-
 <a name="decrement_resource_count-2"></a>
 <a name="decrement_resource_count-2"></a>
 
 
 ### decrement_resource_count/2 ###
 ### decrement_resource_count/2 ###
 
 
 `decrement_resource_count(C, N) -> any()`
 `decrement_resource_count(C, N) -> any()`
 
 
-
 <a name="do_set_counter_value-3"></a>
 <a name="do_set_counter_value-3"></a>
 
 
 ### do_set_counter_value/3 ###
 ### do_set_counter_value/3 ###
 
 
 `do_set_counter_value(Key, Value, Pid) -> any()`
 `do_set_counter_value(Key, Value, Pid) -> any()`
 
 
-
 <a name="do_set_value-3"></a>
 <a name="do_set_value-3"></a>
 
 
 ### do_set_value/3 ###
 ### do_set_value/3 ###
 
 
 `do_set_value(Key, Value, Pid) -> any()`
 `do_set_value(Key, Value, Pid) -> any()`
 
 
-
 <a name="ensure_monitor-2"></a>
 <a name="ensure_monitor-2"></a>
 
 
 ### ensure_monitor/2 ###
 ### ensure_monitor/2 ###
 
 
 `ensure_monitor(Pid, Scope) -> any()`
 `ensure_monitor(Pid, Scope) -> any()`
 
 
-
 <a name="followers-1"></a>
 <a name="followers-1"></a>
 
 
 ### followers/1 ###
 ### followers/1 ###
 
 
 `followers(Opts) -> any()`
 `followers(Opts) -> any()`
 
 
-
 <a name="insert_attr-4"></a>
 <a name="insert_attr-4"></a>
 
 
 ### insert_attr/4 ###
 ### insert_attr/4 ###
 
 
 `insert_attr(Key, Attrs, Pid, Scope) -> any()`
 `insert_attr(Key, Attrs, Pid, Scope) -> any()`
 
 
-
 <a name="insert_many-4"></a>
 <a name="insert_many-4"></a>
 
 
 ### insert_many/4 ###
 ### insert_many/4 ###
 
 
-
 <pre><code>
 <pre><code>
 insert_many(T::<a href="gproc.md#type-type">gproc:type()</a>, Scope::<a href="gproc.md#type-scope">gproc:scope()</a>, KVL::[{<a href="gproc.md#type-key">gproc:key()</a>, any()}], Pid::pid()) -&gt; {true, list()} | false
 insert_many(T::<a href="gproc.md#type-type">gproc:type()</a>, Scope::<a href="gproc.md#type-scope">gproc:scope()</a>, KVL::[{<a href="gproc.md#type-key">gproc:key()</a>, any()}], Pid::pid()) -&gt; {true, list()} | false
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 <a name="insert_reg-4"></a>
 <a name="insert_reg-4"></a>
 
 
 ### insert_reg/4 ###
 ### insert_reg/4 ###
 
 
-
 <pre><code>
 <pre><code>
 insert_reg(K::<a href="gproc.md#type-key">gproc:key()</a>, Value::any(), Pid::pid() | shared, Scope::<a href="gproc.md#type-scope">gproc:scope()</a>) -&gt; boolean()
 insert_reg(K::<a href="gproc.md#type-key">gproc:key()</a>, Value::any(), Pid::pid() | shared, Scope::<a href="gproc.md#type-scope">gproc:scope()</a>) -&gt; boolean()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 <a name="insert_reg-5"></a>
 <a name="insert_reg-5"></a>
 
 
 ### insert_reg/5 ###
 ### insert_reg/5 ###
 
 
 `insert_reg(K, Value, Pid, Scope, Event) -> any()`
 `insert_reg(K, Value, Pid, Scope, Event) -> any()`
 
 
-
 <a name="monitors-1"></a>
 <a name="monitors-1"></a>
 
 
 ### monitors/1 ###
 ### monitors/1 ###
 
 
 `monitors(Opts) -> any()`
 `monitors(Opts) -> any()`
 
 
-
 <a name="notify-2"></a>
 <a name="notify-2"></a>
 
 
 ### notify/2 ###
 ### notify/2 ###
 
 
 `notify(Key, Opts) -> any()`
 `notify(Key, Opts) -> any()`
 
 
-
 <a name="notify-3"></a>
 <a name="notify-3"></a>
 
 
 ### notify/3 ###
 ### notify/3 ###
 
 
 `notify(Event, Key, Opts) -> any()`
 `notify(Event, Key, Opts) -> any()`
 
 
-
 <a name="remove_many-4"></a>
 <a name="remove_many-4"></a>
 
 
 ### remove_many/4 ###
 ### remove_many/4 ###
 
 
 `remove_many(T, Scope, L, Pid) -> any()`
 `remove_many(T, Scope, L, Pid) -> any()`
 
 
-
 <a name="remove_monitor-3"></a>
 <a name="remove_monitor-3"></a>
 
 
 ### remove_monitor/3 ###
 ### remove_monitor/3 ###
 
 
 `remove_monitor(T, Pid, Ref) -> any()`
 `remove_monitor(T, Pid, Ref) -> any()`
 
 
-
 <a name="remove_monitor_pid-2"></a>
 <a name="remove_monitor_pid-2"></a>
 
 
 ### remove_monitor_pid/2 ###
 ### remove_monitor_pid/2 ###
 
 
 `remove_monitor_pid(T, Pid) -> any()`
 `remove_monitor_pid(T, Pid) -> any()`
 
 
-
 <a name="remove_monitors-3"></a>
 <a name="remove_monitors-3"></a>
 
 
 ### remove_monitors/3 ###
 ### remove_monitors/3 ###
 
 
 `remove_monitors(Key, Pid, MPid) -> any()`
 `remove_monitors(Key, Pid, MPid) -> any()`
 
 
-
 <a name="remove_reg-3"></a>
 <a name="remove_reg-3"></a>
 
 
 ### remove_reg/3 ###
 ### remove_reg/3 ###
 
 
 `remove_reg(Key, Pid, Event) -> any()`
 `remove_reg(Key, Pid, Event) -> any()`
 
 
-
 <a name="remove_reg-4"></a>
 <a name="remove_reg-4"></a>
 
 
 ### remove_reg/4 ###
 ### remove_reg/4 ###
 
 
 `remove_reg(Key, Pid, Event, Opts) -> any()`
 `remove_reg(Key, Pid, Event, Opts) -> any()`
 
 
-
 <a name="remove_reverse_mapping-3"></a>
 <a name="remove_reverse_mapping-3"></a>
 
 
 ### remove_reverse_mapping/3 ###
 ### remove_reverse_mapping/3 ###
 
 
 `remove_reverse_mapping(Event, Pid, Key) -> any()`
 `remove_reverse_mapping(Event, Pid, Key) -> any()`
 
 
-
 <a name="remove_reverse_mapping-4"></a>
 <a name="remove_reverse_mapping-4"></a>
 
 
 ### remove_reverse_mapping/4 ###
 ### remove_reverse_mapping/4 ###
 
 
 `remove_reverse_mapping(Event, Pid, Key, Opts) -> any()`
 `remove_reverse_mapping(Event, Pid, Key, Opts) -> any()`
 
 
-
 <a name="remove_wait-4"></a>
 <a name="remove_wait-4"></a>
 
 
 ### remove_wait/4 ###
 ### remove_wait/4 ###
 
 
 `remove_wait(Key, Pid, Ref, Waiters) -> any()`
 `remove_wait(Key, Pid, Ref, Waiters) -> any()`
 
 
-
 <a name="standbys-1"></a>
 <a name="standbys-1"></a>
 
 
 ### standbys/1 ###
 ### standbys/1 ###
 
 
 `standbys(Opts) -> any()`
 `standbys(Opts) -> any()`
 
 
-
 <a name="update_aggr_counter-3"></a>
 <a name="update_aggr_counter-3"></a>
 
 
 ### update_aggr_counter/3 ###
 ### update_aggr_counter/3 ###
 
 
 `update_aggr_counter(C, N, Val) -> any()`
 `update_aggr_counter(C, N, Val) -> any()`
 
 
-
 <a name="update_counter-3"></a>
 <a name="update_counter-3"></a>
 
 
 ### update_counter/3 ###
 ### update_counter/3 ###
 
 
 `update_counter(Key, Incr, Pid) -> any()`
 `update_counter(Key, Incr, Pid) -> any()`
 
 
-
 <a name="valid_opts-2"></a>
 <a name="valid_opts-2"></a>
 
 
 ### valid_opts/2 ###
 ### valid_opts/2 ###
 
 
 `valid_opts(Type, Default) -> any()`
 `valid_opts(Type, Default) -> any()`
 
 
-

+ 4 - 14
doc/gproc_monitor.md

@@ -5,14 +5,14 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
-
 This module implements a notification system for gproc names
 This module implements a notification system for gproc names
 When a process subscribes to notifications for a given name, a message
 When a process subscribes to notifications for a given name, a message
 will be sent each time that name is registered.
 will be sent each time that name is registered.
+
 __Behaviours:__ [`gen_server`](gen_server.md).
 __Behaviours:__ [`gen_server`](gen_server.md).
 
 
 __Authors:__ Ulf Wiger ([`ulf.wiger@feuerlabs.com`](mailto:ulf.wiger@feuerlabs.com)).
 __Authors:__ Ulf Wiger ([`ulf.wiger@feuerlabs.com`](mailto:ulf.wiger@feuerlabs.com)).
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -32,52 +32,42 @@ Unsubscribe from registration events for a certain name.</td></tr></table>
 
 
 ### start_link/0 ###
 ### start_link/0 ###
 
 
-
 <pre><code>
 <pre><code>
 start_link() -&gt; {ok, Pid} | ignore | {error, Error}
 start_link() -&gt; {ok, Pid} | ignore | {error, Error}
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Starts the server
 Starts the server
 
 
 <a name="subscribe-1"></a>
 <a name="subscribe-1"></a>
 
 
 ### subscribe/1 ###
 ### subscribe/1 ###
 
 
-
 <pre><code>
 <pre><code>
 subscribe(Key::<a href="#type-key">key()</a>) -&gt; ok
 subscribe(Key::<a href="#type-key">key()</a>) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
-
 Subscribe to registration events for a certain name
 Subscribe to registration events for a certain name
 
 
-
-
 The subscribing process will receive a `{gproc_monitor, Name, Pid}` message
 The subscribing process will receive a `{gproc_monitor, Name, Pid}` message
 whenever a process registers under the given name, and a
 whenever a process registers under the given name, and a
 `{gproc_monitor, Name, undefined}` message when the name is unregistered,
 `{gproc_monitor, Name, undefined}` message when the name is unregistered,
 either explicitly, or because the registered process dies.
 either explicitly, or because the registered process dies.
 
 
-
 When the subscription is first ordered, one of the above messages will be
 When the subscription is first ordered, one of the above messages will be
 sent immediately, indicating the current status of the name.
 sent immediately, indicating the current status of the name.
+
 <a name="unsubscribe-1"></a>
 <a name="unsubscribe-1"></a>
 
 
 ### unsubscribe/1 ###
 ### unsubscribe/1 ###
 
 
-
 <pre><code>
 <pre><code>
 unsubscribe(Key::<a href="#type-key">key()</a>) -&gt; ok
 unsubscribe(Key::<a href="#type-key">key()</a>) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
-
 Unsubscribe from registration events for a certain name
 Unsubscribe from registration events for a certain name
 
 
-
 This function is the reverse of subscribe/1. It removes the subscription.
 This function is the reverse of subscribe/1. It removes the subscription.
+

+ 23 - 96
doc/gproc_pool.md

@@ -5,49 +5,37 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Load balancing functions based on Gproc.
 Load balancing functions based on Gproc.
+
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
-
-
 This module implements support for load-balancing server pools. It was
 This module implements support for load-balancing server pools. It was
 originally intended mainly as an example of how to use various Gproc
 originally intended mainly as an example of how to use various Gproc
 resources (e.g. counters and shared properties), but is fully integrated
 resources (e.g. counters and shared properties), but is fully integrated
 into Gproc, and fully functional.
 into Gproc, and fully functional.
 
 
 
 
-
-
 ## Concepts ##
 ## Concepts ##
 
 
-
-
 Each pool has a list of 'named' workers (defined using `add_worker/2`) and
 Each pool has a list of 'named' workers (defined using `add_worker/2`) and
 a load-balancing strategy. Processes can then 'connect' to the pool (with
 a load-balancing strategy. Processes can then 'connect' to the pool (with
 `connect_worker/2`), using one of the defined names.
 `connect_worker/2`), using one of the defined names.
 
 
-
-
 Users then 'pick' one of the currently connected processes in the pool. Which
 Users then 'pick' one of the currently connected processes in the pool. Which
 process is picked depends on the load-balancing strategy.
 process is picked depends on the load-balancing strategy.
 
 
-
-
 The whole representation of the pool and its connected workers is in gproc.
 The whole representation of the pool and its connected workers is in gproc.
 The server `gproc_pool` is used to serialize pool management updates, but
 The server `gproc_pool` is used to serialize pool management updates, but
 worker selection is performed entirely in the calling process, and can be
 worker selection is performed entirely in the calling process, and can be
 performed by several processes concurrently.
 performed by several processes concurrently.
 
 
 
 
-
-
 ### Load-balancing strategies ###
 ### Load-balancing strategies ###
 
 
-
 * `round_robin` is the default. A wrapping gproc counter keeps track of the
 * `round_robin` is the default. A wrapping gproc counter keeps track of the
 latest worker picked, and `gproc:next()` is used to find the next worker.
 latest worker picked, and `gproc:next()` is used to find the next worker.
 * `random` picks a random worker from the pool.
 * `random` picks a random worker from the pool.
@@ -74,7 +62,6 @@ jobs will not exceed the size of the pool.<a name="index"></a>
 
 
 ### active_workers/1 ###
 ### active_workers/1 ###
 
 
-
 <pre><code>
 <pre><code>
 active_workers(Pool::any()) -&gt; [{Name, Pid}]
 active_workers(Pool::any()) -&gt; [{Name, Pid}]
 </code></pre>
 </code></pre>
@@ -86,17 +73,13 @@ Return a list of currently connected workers in the pool.
 
 
 ### add_worker/2 ###
 ### add_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 add_worker(Pool::any(), Name::any()) -&gt; integer()
 add_worker(Pool::any(), Name::any()) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Assign a worker name to the pool, returning the worker's position.
 Assign a worker name to the pool, returning the worker's position.
 
 
-
-
 Before a worker can connect to the pool, its name must be added. If no explicit
 Before a worker can connect to the pool, its name must be added. If no explicit
 position is given (see [`add_worker/3`](#add_worker-3)), the most suitable position,
 position is given (see [`add_worker/3`](#add_worker-3)), the most suitable position,
 depending on load-balancing algorithm, is selected: for round_robin and direct
 depending on load-balancing algorithm, is selected: for round_robin and direct
@@ -104,33 +87,29 @@ pools, names are packed tightly from the beginning; for hash and random pools,
 slots are filled as sparsely as possible, in order to maintain an even
 slots are filled as sparsely as possible, in order to maintain an even
 likelihood of hitting each worker.
 likelihood of hitting each worker.
 
 
-
-
 An exception is raised if the pool is full (and `auto_size` is false), or if
 An exception is raised if the pool is full (and `auto_size` is false), or if
 `Name` already exists in the pool.
 `Name` already exists in the pool.
 
 
-
 Before a worker can be used, a process must connect to it (see
 Before a worker can be used, a process must connect to it (see
 [`connect_worker/2`](#connect_worker-2).
 [`connect_worker/2`](#connect_worker-2).
+
 <a name="add_worker-3"></a>
 <a name="add_worker-3"></a>
 
 
 ### add_worker/3 ###
 ### add_worker/3 ###
 
 
-
 <pre><code>
 <pre><code>
 add_worker(Pool::any(), Name::any(), Slot::integer()) -&gt; integer()
 add_worker(Pool::any(), Name::any(), Slot::integer()) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Assign a worker name to a given slot in the pool, returning the slot.
 Assign a worker name to a given slot in the pool, returning the slot.
 
 
-
 This function allows the pool maintainer to exactly position each worker
 This function allows the pool maintainer to exactly position each worker
 inside the pool. An exception is raised if the position is already taken,
 inside the pool. An exception is raised if the position is already taken,
 or if `Name` already exists in the pool. If `Slot` is larger than the current
 or if `Name` already exists in the pool. If `Slot` is larger than the current
 size of the pool, an exception is raised iff `auto_size` is `false`;
 size of the pool, an exception is raised iff `auto_size` is `false`;
 otherwise the pool is expanded to accomodate the new position.
 otherwise the pool is expanded to accomodate the new position.
+
 <a name="claim-2"></a>
 <a name="claim-2"></a>
 
 
 ### claim/2 ###
 ### claim/2 ###
@@ -138,22 +117,19 @@ otherwise the pool is expanded to accomodate the new position.
 `claim(Pool, F) -> any()`
 `claim(Pool, F) -> any()`
 
 
 Equivalent to [`claim(Pool, F, nowait)`](#claim-3).
 Equivalent to [`claim(Pool, F, nowait)`](#claim-3).
+
 <a name="claim-3"></a>
 <a name="claim-3"></a>
 
 
 ### claim/3 ###
 ### claim/3 ###
 
 
-
 <pre><code>
 <pre><code>
 claim(Pool, F::Fun, Wait) -&gt; {true, Res} | false
 claim(Pool, F::Fun, Wait) -&gt; {true, Res} | false
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Pool = any()</code></li><li><code>Fun = function()</code></li><li><code>Wait = nowait | {busy_wait, integer()}</code></li></ul>
 <ul class="definitions"><li><code>Pool = any()</code></li><li><code>Fun = function()</code></li><li><code>Wait = nowait | {busy_wait, integer()}</code></li></ul>
 
 
-
 Picks the first available worker in the pool and applies `Fun`.
 Picks the first available worker in the pool and applies `Fun`.
 
 
-
-
 A `claim` pool allows the caller to "claim" a worker during a short span
 A `claim` pool allows the caller to "claim" a worker during a short span
 (essentially, a lock is set and released as soon as `Fun` returns).
 (essentially, a lock is set and released as soon as `Fun` returns).
 Once a worker is selected, `Fun(Name, Pid)` is called, where `Name` is a
 Once a worker is selected, `Fun(Name, Pid)` is called, where `Name` is a
@@ -162,30 +138,24 @@ The gproc name of the worker serves as a mutex, where its value is 0 (zero)
 if the worker is free, and 1 (one) if it is busy. The mutex operation is
 if the worker is free, and 1 (one) if it is busy. The mutex operation is
 implemented using `gproc:update_counter/2`.
 implemented using `gproc:update_counter/2`.
 
 
-
-
 `Wait == nowait` means that the call will return `false` immediately if
 `Wait == nowait` means that the call will return `false` immediately if
 there is no available worker.
 there is no available worker.
 
 
-
 `Wait == {busy_wait, Timeout}` will keep repeating the claim attempt
 `Wait == {busy_wait, Timeout}` will keep repeating the claim attempt
 for `Timeout` milliseconds. If still no worker is available, it will
 for `Timeout` milliseconds. If still no worker is available, it will
 return `false`.
 return `false`.
+
 <a name="connect_worker-2"></a>
 <a name="connect_worker-2"></a>
 
 
 ### connect_worker/2 ###
 ### connect_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 connect_worker(Pool::any(), Name::any()) -&gt; true
 connect_worker(Pool::any(), Name::any()) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Connect the current process to `Name` in `Pool`.
 Connect the current process to `Name` in `Pool`.
 
 
-
-
 Typically, a server will call this function as it starts, similarly to when
 Typically, a server will call this function as it starts, similarly to when
 it registers itself. In fact, calling `connect_worker/2` leads to the process
 it registers itself. In fact, calling `connect_worker/2` leads to the process
 being registered as `{n,l,[gproc_pool,N,Name]}`, where `N` is the position of
 being registered as `{n,l,[gproc_pool,N,Name]}`, where `N` is the position of
@@ -193,135 +163,117 @@ being registered as `{n,l,[gproc_pool,N,Name]}`, where `N` is the position of
 removes the connection automatically if it dies, and (b) that the registered
 removes the connection automatically if it dies, and (b) that the registered
 names can be listed in order of their positions in the pool.
 names can be listed in order of their positions in the pool.
 
 
-
 This function raises an exception if `Name` does not exist in `Pool` (or
 This function raises an exception if `Name` does not exist in `Pool` (or
 there is no such pool), or if another worker is already connected to
 there is no such pool), or if another worker is already connected to
 `Name`.
 `Name`.
+
 <a name="defined_workers-1"></a>
 <a name="defined_workers-1"></a>
 
 
 ### defined_workers/1 ###
 ### defined_workers/1 ###
 
 
-
 <pre><code>
 <pre><code>
 defined_workers(Pool::any()) -&gt; [{Name, Pos, Count}]
 defined_workers(Pool::any()) -&gt; [{Name, Pos, Count}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Return a list of added workers in the pool.
 Return a list of added workers in the pool.
 
 
-
-
 The added workers are slots in the pool that have been given names, and thus
 The added workers are slots in the pool that have been given names, and thus
 can be connected to. This function doesn't detect whether or not there are
 can be connected to. This function doesn't detect whether or not there are
 any connected (active) workers.
 any connected (active) workers.
 
 
-
 The list contains `{Name, Pos, Count}`, where `Name` is the name of the added
 The list contains `{Name, Pos, Count}`, where `Name` is the name of the added
 worker, `Pos` is its position in the pool, and `Count` represents the number
 worker, `Pos` is its position in the pool, and `Count` represents the number
 of times the worker has been picked (assuming callers keep count by explicitly
 of times the worker has been picked (assuming callers keep count by explicitly
 calling [`log/1`](#log-1)).
 calling [`log/1`](#log-1)).
+
 <a name="delete-1"></a>
 <a name="delete-1"></a>
 
 
 ### delete/1 ###
 ### delete/1 ###
 
 
-
 <pre><code>
 <pre><code>
 delete(Pool::any()) -&gt; true
 delete(Pool::any()) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Delete an existing pool.
 Delete an existing pool.
 
 
-
 This function will delete a pool, only if there are no connected workers.
 This function will delete a pool, only if there are no connected workers.
 Ensure that workers have been disconnected before deleting the pool.
 Ensure that workers have been disconnected before deleting the pool.
+
 <a name="disconnect_worker-2"></a>
 <a name="disconnect_worker-2"></a>
 
 
 ### disconnect_worker/2 ###
 ### disconnect_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 disconnect_worker(Pool, Name) -&gt; true
 disconnect_worker(Pool, Name) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Disconnect the current process from `Name` in `Pool`.
 Disconnect the current process from `Name` in `Pool`.
 
 
-
-
 This function is similar to a `gproc:unreg()` call. It removes the
 This function is similar to a `gproc:unreg()` call. It removes the
 connection between `Pool`, `Name` and pid, and makes it possible for another
 connection between `Pool`, `Name` and pid, and makes it possible for another
 process to connect to `Name`.
 process to connect to `Name`.
 
 
-
 An exception is raised if there is no prior connection between `Pool`,
 An exception is raised if there is no prior connection between `Pool`,
 `Name` and the current process.
 `Name` and the current process.
+
 <a name="force_delete-1"></a>
 <a name="force_delete-1"></a>
 
 
 ### force_delete/1 ###
 ### force_delete/1 ###
 
 
-
 <pre><code>
 <pre><code>
 force_delete(Pool::any()) -&gt; true
 force_delete(Pool::any()) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Forcibly remove a pool, terminating all active workers
 Forcibly remove a pool, terminating all active workers
 
 
-
 This function is primarily intended for cleanup of any pools that might have
 This function is primarily intended for cleanup of any pools that might have
 become inconsistent (for whatever reason). It will clear out all resources
 become inconsistent (for whatever reason). It will clear out all resources
 belonging to the pool and send `exit(Pid, kill)` signals to all connected
 belonging to the pool and send `exit(Pid, kill)` signals to all connected
 workers (except the calling process).
 workers (except the calling process).
+
 <a name="log-1"></a>
 <a name="log-1"></a>
 
 
 ### log/1 ###
 ### log/1 ###
 
 
-
 <pre><code>
 <pre><code>
 log(X1::GprocKey) -&gt; integer()
 log(X1::GprocKey) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Update a counter associated with a worker name.
 Update a counter associated with a worker name.
 
 
-
 Each added worker has a gproc counter that can be used e.g. to keep track of
 Each added worker has a gproc counter that can be used e.g. to keep track of
 the number of times the worker has been picked. Since it's associated with the
 the number of times the worker has been picked. Since it's associated with the
 named 'slot', and not to the connected worker, its value will persist even
 named 'slot', and not to the connected worker, its value will persist even
 if the currently connected worker dies.
 if the currently connected worker dies.
+
 <a name="new-1"></a>
 <a name="new-1"></a>
 
 
 ### new/1 ###
 ### new/1 ###
 
 
-
 <pre><code>
 <pre><code>
 new(Pool::any()) -&gt; ok
 new(Pool::any()) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Equivalent to [`new(Pool, round_robin, [])`](#new-3).
 Equivalent to [`new(Pool, round_robin, [])`](#new-3).
+
 <a name="new-3"></a>
 <a name="new-3"></a>
 
 
 ### new/3 ###
 ### new/3 ###
 
 
-
 <pre><code>
 <pre><code>
 new(Pool::any(), Type, Opts) -&gt; true
 new(Pool::any(), Type, Opts) -&gt; true
 </code></pre>
 </code></pre>
 
 
 <ul class="definitions"><li><code>Type = round_robin | random | hash | direct | claim</code></li><li><code>Opts = [{size, integer()} | {auto_size, boolean()}]</code></li></ul>
 <ul class="definitions"><li><code>Type = round_robin | random | hash | direct | claim</code></li><li><code>Opts = [{size, integer()} | {auto_size, boolean()}]</code></li></ul>
 
 
-
 Create a new pool.
 Create a new pool.
 
 
-
-
 The pool starts out empty. If a size is not given, the pool size is set to
 The pool starts out empty. If a size is not given, the pool size is set to
 0 initially. `auto_size` is `true` by default if size is not specified, but
 0 initially. `auto_size` is `true` by default if size is not specified, but
 `false` by default otherwise. If `auto_size == true`, the pool will be
 `false` by default otherwise. If `auto_size == true`, the pool will be
@@ -329,187 +281,162 @@ enlarged to accomodate new workers, when necessary. Otherwise, trying to add
 a worker when the pool is full will raise an exception, as will trying to add
 a worker when the pool is full will raise an exception, as will trying to add
 a worker on a specific position beyond the current size of the pool.
 a worker on a specific position beyond the current size of the pool.
 
 
-
 If the given pool already exists, this function will raise an exception.
 If the given pool already exists, this function will raise an exception.
+
 <a name="pick-1"></a>
 <a name="pick-1"></a>
 
 
 ### pick/1 ###
 ### pick/1 ###
 
 
-
 <pre><code>
 <pre><code>
 pick(Pool::any()) -&gt; GprocName | false
 pick(Pool::any()) -&gt; GprocName | false
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Pick a worker from the pool given the pool's load-balancing algorithm.
 Pick a worker from the pool given the pool's load-balancing algorithm.
 
 
-
 The pool types that allows picking without an extra argument are
 The pool types that allows picking without an extra argument are
 round_robin and random. This function returns `false` if there is no available
 round_robin and random. This function returns `false` if there is no available
 worker, or if `Pool` is not a valid pool.
 worker, or if `Pool` is not a valid pool.
+
 <a name="pick-2"></a>
 <a name="pick-2"></a>
 
 
 ### pick/2 ###
 ### pick/2 ###
 
 
-
 <pre><code>
 <pre><code>
 pick(Pool::any(), Value::any()) -&gt; GprocName | false
 pick(Pool::any(), Value::any()) -&gt; GprocName | false
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Pick a worker from the pool based on `Value`.
 Pick a worker from the pool based on `Value`.
 
 
-
-
 The pool types that allows picking based on an extra argument are
 The pool types that allows picking based on an extra argument are
 hash and direct. This function returns `false` if there is no available
 hash and direct. This function returns `false` if there is no available
 worker, or if `Pool` is not a valid pool.
 worker, or if `Pool` is not a valid pool.
 
 
-
 If the pool is of type `direct`, `Value` must be an integer corresponding to
 If the pool is of type `direct`, `Value` must be an integer corresponding to
 a position in the pool (modulo the size of the pool). If the type is
 a position in the pool (modulo the size of the pool). If the type is
 `hash`, `Value` may be any term, and its hash value will serve as a guide for
 `hash`, `Value` may be any term, and its hash value will serve as a guide for
 selecting a worker.
 selecting a worker.
+
 <a name="pick_worker-1"></a>
 <a name="pick_worker-1"></a>
 
 
 ### pick_worker/1 ###
 ### pick_worker/1 ###
 
 
-
 <pre><code>
 <pre><code>
 pick_worker(Pool::any()) -&gt; pid() | false
 pick_worker(Pool::any()) -&gt; pid() | false
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Pick a worker pid from the pool given the pool's load-balancing algorithm.
 Pick a worker pid from the pool given the pool's load-balancing algorithm.
 
 
-
 Like [`pick/1`](#pick-1), but returns the worker pid instead of the name.
 Like [`pick/1`](#pick-1), but returns the worker pid instead of the name.
+
 <a name="pick_worker-2"></a>
 <a name="pick_worker-2"></a>
 
 
 ### pick_worker/2 ###
 ### pick_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 pick_worker(Pool::any(), Value::any()) -&gt; pid() | false
 pick_worker(Pool::any(), Value::any()) -&gt; pid() | false
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Pick a worker pid from the pool given the pool's load-balancing algorithm.
 Pick a worker pid from the pool given the pool's load-balancing algorithm.
 
 
-
 Like [`pick/2`](#pick-2), but returns the worker pid instead of the name.
 Like [`pick/2`](#pick-2), but returns the worker pid instead of the name.
+
 <a name="ptest-4"></a>
 <a name="ptest-4"></a>
 
 
 ### ptest/4 ###
 ### ptest/4 ###
 
 
 `ptest(N, I, Type, Opts) -> any()`
 `ptest(N, I, Type, Opts) -> any()`
 
 
-
 <a name="randomize-1"></a>
 <a name="randomize-1"></a>
 
 
 ### randomize/1 ###
 ### randomize/1 ###
 
 
-
 <pre><code>
 <pre><code>
 randomize(Pool::any()) -&gt; integer()
 randomize(Pool::any()) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Randomizes the "next" pointer for the pool.
 Randomizes the "next" pointer for the pool.
 
 
-
 This function only has an effect for `round_robin` pools, which have a
 This function only has an effect for `round_robin` pools, which have a
 reference to the next worker to be picked. Without randomizing, the load
 reference to the next worker to be picked. Without randomizing, the load
 balancing will always start with the first worker in the pool.
 balancing will always start with the first worker in the pool.
+
 <a name="remove_worker-2"></a>
 <a name="remove_worker-2"></a>
 
 
 ### remove_worker/2 ###
 ### remove_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 remove_worker(Pool::any(), Name::any()) -&gt; true
 remove_worker(Pool::any(), Name::any()) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Remove a previously added worker.
 Remove a previously added worker.
 
 
-
 This function will assume that any connected worker is disconnected first.
 This function will assume that any connected worker is disconnected first.
 It will fail if there is no such pool, but will return `true` in the case
 It will fail if there is no such pool, but will return `true` in the case
 when `Name` did not exist in the pool in the first place.
 when `Name` did not exist in the pool in the first place.
+
 <a name="setup_test_pool-4"></a>
 <a name="setup_test_pool-4"></a>
 
 
 ### setup_test_pool/4 ###
 ### setup_test_pool/4 ###
 
 
 `setup_test_pool(P, Type0, Opts, Workers) -> any()`
 `setup_test_pool(P, Type0, Opts, Workers) -> any()`
 
 
-
 <a name="test_run0-2"></a>
 <a name="test_run0-2"></a>
 
 
 ### test_run0/2 ###
 ### test_run0/2 ###
 
 
 `test_run0(N, X) -> any()`
 `test_run0(N, X) -> any()`
 
 
-
 <a name="whereis_worker-2"></a>
 <a name="whereis_worker-2"></a>
 
 
 ### whereis_worker/2 ###
 ### whereis_worker/2 ###
 
 
-
 <pre><code>
 <pre><code>
 whereis_worker(Pool::any(), Name::any()) -&gt; pid() | undefined
 whereis_worker(Pool::any(), Name::any()) -&gt; pid() | undefined
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Look up the pid of a connected worker.
 Look up the pid of a connected worker.
 
 
-
 This function works similarly to `gproc:where/1`: it will return the pid
 This function works similarly to `gproc:where/1`: it will return the pid
 of the worker connected as `Pool / Name`, if there is such a worker; otherwise
 of the worker connected as `Pool / Name`, if there is such a worker; otherwise
 it will return `undefined`. It will raise an exception if `Name` has not been
 it will return `undefined`. It will raise an exception if `Name` has not been
 added to the pool.
 added to the pool.
+
 <a name="worker_id-2"></a>
 <a name="worker_id-2"></a>
 
 
 ### worker_id/2 ###
 ### worker_id/2 ###
 
 
-
 <pre><code>
 <pre><code>
 worker_id(Pool, Name) -&gt; GprocName
 worker_id(Pool, Name) -&gt; GprocName
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Return the unique gproc name corresponding to a name in the pool.
 Return the unique gproc name corresponding to a name in the pool.
 
 
-
 This function assumes that `Name` has been added to `Pool`. It returns the
 This function assumes that `Name` has been added to `Pool`. It returns the
 unique name that a connected worker will be registered as. This doesn't mean
 unique name that a connected worker will be registered as. This doesn't mean
 that there is, in fact, such a connected worker.
 that there is, in fact, such a connected worker.
+
 <a name="worker_pool-1"></a>
 <a name="worker_pool-1"></a>
 
 
 ### worker_pool/1 ###
 ### worker_pool/1 ###
 
 
-
 <pre><code>
 <pre><code>
 worker_pool(Pool::any()) -&gt; [integer() | {Name, Pos}]
 worker_pool(Pool::any()) -&gt; [integer() | {Name, Pos}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Return a list of slots and/or named workers in the pool.
 Return a list of slots and/or named workers in the pool.
 
 
-
-
 This function is mainly for testing, but can also be useful when implementing
 This function is mainly for testing, but can also be useful when implementing
 your own worker placement algorithm on top of gproc_pool.
 your own worker placement algorithm on top of gproc_pool.
 
 
-
 A plain integer represents an unfilled slot, and `{Name, Pos}` represents an
 A plain integer represents an unfilled slot, and `{Name, Pos}` represents an
 added worker. The pool is always filled to the current size.
 added worker. The pool is always filled to the current size.
+

+ 16 - 89
doc/gproc_ps.md

@@ -6,21 +6,19 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Gproc Publish/Subscribe patterns
 Gproc Publish/Subscribe patterns
 This module implements a few convenient functions for publish/subscribe.
 This module implements a few convenient functions for publish/subscribe.
+
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
-
-
 Publish/subscribe with Gproc relies entirely on gproc properties and counters.
 Publish/subscribe with Gproc relies entirely on gproc properties and counters.
 This makes for a very concise implementation, as the monitoring of subscribers and
 This makes for a very concise implementation, as the monitoring of subscribers and
 removal of subscriptions comes for free with Gproc.
 removal of subscriptions comes for free with Gproc.
 
 
-
 Using this module instead of rolling your own (which is easy enough) brings the
 Using this module instead of rolling your own (which is easy enough) brings the
 benefit of consistency, in tracing and debugging.
 benefit of consistency, in tracing and debugging.
 The implementation can also serve to illustrate how to use gproc properties and
 The implementation can also serve to illustrate how to use gproc properties and
@@ -36,7 +34,6 @@ counters to good effect.
 ### <a name="type-event">event()</a> ###
 ### <a name="type-event">event()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 event() = any()
 event() = any()
 </code></pre>
 </code></pre>
@@ -44,11 +41,9 @@ event() = any()
 
 
 
 
 
 
-
 ### <a name="type-msg">msg()</a> ###
 ### <a name="type-msg">msg()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 msg() = any()
 msg() = any()
 </code></pre>
 </code></pre>
@@ -56,11 +51,9 @@ msg() = any()
 
 
 
 
 
 
-
 ### <a name="type-scope">scope()</a> ###
 ### <a name="type-scope">scope()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 scope() = l | g
 scope() = l | g
 </code></pre>
 </code></pre>
@@ -68,16 +61,13 @@ scope() = l | g
 
 
 
 
 
 
-
 ### <a name="type-status">status()</a> ###
 ### <a name="type-status">status()</a> ###
 
 
 
 
-
 <pre><code>
 <pre><code>
 status() = 1 | 0
 status() = 1 | 0
 </code></pre>
 </code></pre>
 
 
-
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -94,270 +84,215 @@ status() = 1 | 0
 
 
 ### change_cond/3 ###
 ### change_cond/3 ###
 
 
-
 <pre><code>
 <pre><code>
 change_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Spec::undefined | <a href="ets.md#type-match_spec">ets:match_spec()</a>) -&gt; true
 change_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Spec::undefined | <a href="ets.md#type-match_spec">ets:match_spec()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Change the condition specification of an existing subscription.
 Change the condition specification of an existing subscription.
 
 
-
-
 This function atomically changes the condition spec of an existing
 This function atomically changes the condition spec of an existing
 subscription (see [`subscribe_cond/3`](#subscribe_cond-3)). An exception is raised if
 subscription (see [`subscribe_cond/3`](#subscribe_cond-3)). An exception is raised if
 the subscription doesn't already exist.
 the subscription doesn't already exist.
 
 
-
 Note that this function can also be used to change a conditional subscription
 Note that this function can also be used to change a conditional subscription
 to an unconditional one (by setting `Spec = undefined`), or a 'normal'
 to an unconditional one (by setting `Spec = undefined`), or a 'normal'
 subscription to a conditional one.
 subscription to a conditional one.
+
 <a name="create_single-2"></a>
 <a name="create_single-2"></a>
 
 
 ### create_single/2 ###
 ### create_single/2 ###
 
 
-
 <pre><code>
 <pre><code>
 create_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 create_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Creates a single-shot subscription entry for Event
 Creates a single-shot subscription entry for Event
 
 
-
-
 Single-shot subscriptions behave similarly to the `{active,once}` property of sockets.
 Single-shot subscriptions behave similarly to the `{active,once}` property of sockets.
 Once a message has been published, the subscription is disabled, and no more messages
 Once a message has been published, the subscription is disabled, and no more messages
 will be delivered to the subscriber unless the subscription is re-enabled using
 will be delivered to the subscriber unless the subscription is re-enabled using
 `enable_single/2`.
 `enable_single/2`.
 
 
-
-
 The function creates a gproc counter entry, `{c,Scope,{gproc_ps_event,Event}}`, which
 The function creates a gproc counter entry, `{c,Scope,{gproc_ps_event,Event}}`, which
 will have either of the values `0` (disabled) or `1` (enabled). Initially, the value
 will have either of the values `0` (disabled) or `1` (enabled). Initially, the value
 is `1`, meaning the subscription is enabled.
 is `1`, meaning the subscription is enabled.
 
 
-
 Counters are used in this case, since they can be atomically updated by both the
 Counters are used in this case, since they can be atomically updated by both the
 subscriber (owner) and publisher. The publisher sets the counter value to `0` as soon
 subscriber (owner) and publisher. The publisher sets the counter value to `0` as soon
 as it has delivered a message.
 as it has delivered a message.
+
 <a name="delete_single-2"></a>
 <a name="delete_single-2"></a>
 
 
 ### delete_single/2 ###
 ### delete_single/2 ###
 
 
-
 <pre><code>
 <pre><code>
 delete_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 delete_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Deletes the single-shot subscription for Event
 Deletes the single-shot subscription for Event
 
 
-
 This function deletes the counter entry representing the single-shot description.
 This function deletes the counter entry representing the single-shot description.
 An exception will be raised if there is no such subscription.
 An exception will be raised if there is no such subscription.
+
 <a name="disable_single-2"></a>
 <a name="disable_single-2"></a>
 
 
 ### disable_single/2 ###
 ### disable_single/2 ###
 
 
-
 <pre><code>
 <pre><code>
 disable_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; integer()
 disable_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Disables the single-shot subscription for Event
 Disables the single-shot subscription for Event
 
 
-
-
 This function changes the value of the corresponding gproc counter to `0` (disabled).
 This function changes the value of the corresponding gproc counter to `0` (disabled).
 
 
-
-
 The subscription remains (e.g. for debugging purposes), but with a 'disabled' status.
 The subscription remains (e.g. for debugging purposes), but with a 'disabled' status.
 This function is insensitive to concurrency, using 'wrapping' ets counter update ops.
 This function is insensitive to concurrency, using 'wrapping' ets counter update ops.
 This guarantees that the counter will have either the value 1 or 0, depending on which
 This guarantees that the counter will have either the value 1 or 0, depending on which
 update happened last.
 update happened last.
 
 
-
 The return value indicates the previous status.
 The return value indicates the previous status.
+
 <a name="enable_single-2"></a>
 <a name="enable_single-2"></a>
 
 
 ### enable_single/2 ###
 ### enable_single/2 ###
 
 
-
 <pre><code>
 <pre><code>
 enable_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; integer()
 enable_single(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; integer()
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Enables the single-shot subscription for Event
 Enables the single-shot subscription for Event
 
 
-
-
 This function changes the value of the corresponding gproc counter to `1` (enabled).
 This function changes the value of the corresponding gproc counter to `1` (enabled).
 
 
-
-
 After enabling, the subscriber will receive the next message published for `Event`,
 After enabling, the subscriber will receive the next message published for `Event`,
 after which the subscription is automatically disabled.
 after which the subscription is automatically disabled.
 
 
-
-
 This function is insensitive to concurrency, using 'wrapping' ets counter update ops.
 This function is insensitive to concurrency, using 'wrapping' ets counter update ops.
 This guarantees that the counter will have either the value 1 or 0, depending on which
 This guarantees that the counter will have either the value 1 or 0, depending on which
 update happened last.
 update happened last.
 
 
-
 The return value indicates the previous status.
 The return value indicates the previous status.
+
 <a name="list_singles-2"></a>
 <a name="list_singles-2"></a>
 
 
 ### list_singles/2 ###
 ### list_singles/2 ###
 
 
-
 <pre><code>
 <pre><code>
 list_singles(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; [{pid(), <a href="#type-status">status()</a>}]
 list_singles(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; [{pid(), <a href="#type-status">status()</a>}]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
 Lists all single-shot subscribers of Event, together with their status
 Lists all single-shot subscribers of Event, together with their status
+
 <a name="list_subs-2"></a>
 <a name="list_subs-2"></a>
 
 
 ### list_subs/2 ###
 ### list_subs/2 ###
 
 
-
 <pre><code>
 <pre><code>
 list_subs(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; [pid()]
 list_subs(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; [pid()]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 List the pids of all processes subscribing to `Event`
 List the pids of all processes subscribing to `Event`
 
 
-
 This function uses `gproc:select/2` to find all properties indicating a subscription.
 This function uses `gproc:select/2` to find all properties indicating a subscription.
+
 <a name="notify_single_if_true-4"></a>
 <a name="notify_single_if_true-4"></a>
 
 
 ### notify_single_if_true/4 ###
 ### notify_single_if_true/4 ###
 
 
-
 <pre><code>
 <pre><code>
 notify_single_if_true(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, F::fun(() -&gt; boolean()), Msg::<a href="#type-msg">msg()</a>) -&gt; ok
 notify_single_if_true(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, F::fun(() -&gt; boolean()), Msg::<a href="#type-msg">msg()</a>) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Create/enable a single subscription for event; notify at once if F() -> true
 Create/enable a single subscription for event; notify at once if F() -> true
 
 
-
 This function is a convenience function, wrapping a single-shot pub/sub around a
 This function is a convenience function, wrapping a single-shot pub/sub around a
 user-provided boolean test. `Msg` should be what the publisher will send later, if the
 user-provided boolean test. `Msg` should be what the publisher will send later, if the
 immediate test returns `false`.
 immediate test returns `false`.
+
 <a name="publish-3"></a>
 <a name="publish-3"></a>
 
 
 ### publish/3 ###
 ### publish/3 ###
 
 
-
 <pre><code>
 <pre><code>
 publish(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; ok
 publish(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; ok
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Publish the message `Msg` to all subscribers of `Event`
 Publish the message `Msg` to all subscribers of `Event`
 
 
-
-
 The message delivered to each subscriber will be of the form:
 The message delivered to each subscriber will be of the form:
 
 
-
-
 `{gproc_ps_event, Event, Msg}`
 `{gproc_ps_event, Event, Msg}`
 
 
-
 The function uses `gproc:send/2` to send a message to all processes which have a
 The function uses `gproc:send/2` to send a message to all processes which have a
 property `{p,Scope,{gproc_ps_event,Event}}`.
 property `{p,Scope,{gproc_ps_event,Event}}`.
+
 <a name="publish_cond-3"></a>
 <a name="publish_cond-3"></a>
 
 
 ### publish_cond/3 ###
 ### publish_cond/3 ###
 
 
-
 <pre><code>
 <pre><code>
 publish_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; <a href="#type-msg">msg()</a>
 publish_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; <a href="#type-msg">msg()</a>
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Publishes the message `Msg` to conditional subscribers of `Event`
 Publishes the message `Msg` to conditional subscribers of `Event`
 
 
-
 The message will be delivered to each subscriber provided their respective
 The message will be delivered to each subscriber provided their respective
 condition tests succeed.
 condition tests succeed.
 
 
-
 __See also:__ [subscribe_cond/3](#subscribe_cond-3).
 __See also:__ [subscribe_cond/3](#subscribe_cond-3).
+
 <a name="subscribe-2"></a>
 <a name="subscribe-2"></a>
 
 
 ### subscribe/2 ###
 ### subscribe/2 ###
 
 
-
 <pre><code>
 <pre><code>
 subscribe(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 subscribe(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Subscribe to events of type `Event`
 Subscribe to events of type `Event`
 
 
-
-
 Any messages published with `gproc_ps:publish(Scope, Event, Msg)` will be
 Any messages published with `gproc_ps:publish(Scope, Event, Msg)` will be
 delivered to the current process, along with all other subscribers.
 delivered to the current process, along with all other subscribers.
 
 
-
-
 This function creates a property, `{p,Scope,{gproc_ps_event,Event}}`, which
 This function creates a property, `{p,Scope,{gproc_ps_event,Event}}`, which
 can be searched and displayed for debugging purposes.
 can be searched and displayed for debugging purposes.
 
 
-
 Note that, as with [`gproc:reg/1`](gproc.md#reg-1), this function will raise an
 Note that, as with [`gproc:reg/1`](gproc.md#reg-1), this function will raise an
 exception if you try to subscribe to the same event twice from the same
 exception if you try to subscribe to the same event twice from the same
 process.
 process.
+
 <a name="subscribe_cond-3"></a>
 <a name="subscribe_cond-3"></a>
 
 
 ### subscribe_cond/3 ###
 ### subscribe_cond/3 ###
 
 
-
 <pre><code>
 <pre><code>
 subscribe_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Spec::undefined | <a href="ets.md#type-match_spec">ets:match_spec()</a>) -&gt; true
 subscribe_cond(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Spec::undefined | <a href="ets.md#type-match_spec">ets:match_spec()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Subscribe conditionally to events of type `Event`
 Subscribe conditionally to events of type `Event`
 
 
-
-
 This function is similar to [`subscribe/2`](#subscribe-2), but adds a condition
 This function is similar to [`subscribe/2`](#subscribe-2), but adds a condition
 in the form of a match specification.
 in the form of a match specification.
 
 
-
-
 The condition is tested by the [`publish_cond/3`](#publish_cond-3) function
 The condition is tested by the [`publish_cond/3`](#publish_cond-3) function
 and a message is delivered only if the condition is true. Specifically,
 and a message is delivered only if the condition is true. Specifically,
 the test is:
 the test is:
 
 
-
-
 `ets:match_spec_run([Msg], ets:match_spec_compile(Cond)) == [true]`
 `ets:match_spec_run([Msg], ets:match_spec_compile(Cond)) == [true]`
 
 
-
-
 In other words, if the match_spec returns true for a message, that message
 In other words, if the match_spec returns true for a message, that message
 is sent to the subscriber. For any other result from the match_spec, the
 is sent to the subscriber. For any other result from the match_spec, the
 message is not sent. `Cond == undefined` means that all messages will be
 message is not sent. `Cond == undefined` means that all messages will be
@@ -366,30 +301,24 @@ like [`publish/3`](#publish-3) does, except that `publish/3` strictly speaking
 ignores the Value part of the property completely, whereas `publish_cond/3`
 ignores the Value part of the property completely, whereas `publish_cond/3`
 expects it to be either undefined or a valid match spec).
 expects it to be either undefined or a valid match spec).
 
 
-
-
 This means that `Cond=undefined` and `Cond=[{'_',[],[true]}]` are
 This means that `Cond=undefined` and `Cond=[{'_',[],[true]}]` are
 equivalent.
 equivalent.
 
 
-
 Note that, as with [`gproc:reg/1`](gproc.md#reg-1), this function will raise an
 Note that, as with [`gproc:reg/1`](gproc.md#reg-1), this function will raise an
 exception if you try to subscribe to the same event twice from the same
 exception if you try to subscribe to the same event twice from the same
 process.
 process.
+
 <a name="tell_singles-3"></a>
 <a name="tell_singles-3"></a>
 
 
 ### tell_singles/3 ###
 ### tell_singles/3 ###
 
 
-
 <pre><code>
 <pre><code>
 tell_singles(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; [pid()]
 tell_singles(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>, Msg::<a href="#type-msg">msg()</a>) -&gt; [pid()]
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Publish `Msg` to all single-shot subscribers of `Event`
 Publish `Msg` to all single-shot subscribers of `Event`
 
 
-
-
 The subscriber status of each active subscriber is changed to `0` (disabled) before
 The subscriber status of each active subscriber is changed to `0` (disabled) before
 delivering the message. This reduces the risk that two different processes will be able
 delivering the message. This reduces the risk that two different processes will be able
 to both deliver a message before disabling the subscribers. This could happen if the
 to both deliver a message before disabling the subscribers. This could happen if the
@@ -397,21 +326,19 @@ context switch happens just after the select operation (finding the active subsc
 and before the process is able to update the counters. In this case, it is possible
 and before the process is able to update the counters. In this case, it is possible
 that more than one can be delivered.
 that more than one can be delivered.
 
 
-
 The way to prevent this from happening is to ensure that only one process publishes
 The way to prevent this from happening is to ensure that only one process publishes
 for `Event`.
 for `Event`.
+
 <a name="unsubscribe-2"></a>
 <a name="unsubscribe-2"></a>
 
 
 ### unsubscribe/2 ###
 ### unsubscribe/2 ###
 
 
-
 <pre><code>
 <pre><code>
 unsubscribe(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 unsubscribe(Scope::<a href="#type-scope">scope()</a>, Event::<a href="#type-event">event()</a>) -&gt; true
 </code></pre>
 </code></pre>
 <br />
 <br />
 
 
-
 Remove subscribtion created using `subscribe(Scope, Event)`
 Remove subscribtion created using `subscribe(Scope, Event)`
 
 
-
 This removes the property created through `subscribe/2`.
 This removes the property created through `subscribe/2`.
+

+ 2 - 9
doc/gproc_pt.md

@@ -5,34 +5,28 @@
 * [Function Index](#index)
 * [Function Index](#index)
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
-
 Parse transform utility for gproc users.
 Parse transform utility for gproc users.
+
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)), Dmitry Demeshchuk ([`demeshchuk@gmail.com`](mailto:demeshchuk@gmail.com)).
 __Authors:__ Ulf Wiger ([`ulf@wiger.net`](mailto:ulf@wiger.net)), Dmitry Demeshchuk ([`demeshchuk@gmail.com`](mailto:demeshchuk@gmail.com)).
+
 <a name="description"></a>
 <a name="description"></a>
 
 
 ## Description ##
 ## Description ##
 
 
-
-
 This module provides some closer syntactical integration for
 This module provides some closer syntactical integration for
 people who are enthusiastic gproc users.
 people who are enthusiastic gproc users.
 
 
-
-
 Specifically, this module transforms `Pid ! Msg` into
 Specifically, this module transforms `Pid ! Msg` into
 `gproc:send(Pid, Msg)`, which, apart from accepting any type for
 `gproc:send(Pid, Msg)`, which, apart from accepting any type for
 `Pid` that `!` understands, is also able to handle a gproc "triple",
 `Pid` that `!` understands, is also able to handle a gproc "triple",
 e.g. `{n, l, Name}` or even `{p, l, Prop}` (in the latter case, the
 e.g. `{n, l, Name}` or even `{p, l, Prop}` (in the latter case, the
 message may be delivered to multiple recipients).
 message may be delivered to multiple recipients).
 
 
-
-
 Users should be aware that parse transforms may be confusing to
 Users should be aware that parse transforms may be confusing to
 the casual reader, since they extend the semantics of possibly
 the casual reader, since they extend the semantics of possibly
 ubiquitous constructs (as is the case with this transform). Therefore,
 ubiquitous constructs (as is the case with this transform). Therefore,
 you should document clearly that this is happening.
 you should document clearly that this is happening.
 
 
-
 Original suggestion by Dimitry Demeschuk.<a name="index"></a>
 Original suggestion by Dimitry Demeschuk.<a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -51,4 +45,3 @@ Original suggestion by Dimitry Demeschuk.<a name="index"></a>
 
 
 `parse_transform(Forms, Options) -> any()`
 `parse_transform(Forms, Options) -> any()`
 
 
-

+ 2 - 1
doc/gproc_sup.md

@@ -5,6 +5,7 @@
 * [Function Details](#functions)
 * [Function Details](#functions)
 
 
 __Behaviours:__ [`supervisor`](supervisor.md).
 __Behaviours:__ [`supervisor`](supervisor.md).
+
 <a name="index"></a>
 <a name="index"></a>
 
 
 ## Function Index ##
 ## Function Index ##
@@ -24,10 +25,10 @@ __Behaviours:__ [`supervisor`](supervisor.md).
 `init(Args) -> any()`
 `init(Args) -> any()`
 
 
 The main GPROC supervisor.
 The main GPROC supervisor.
+
 <a name="start_link-1"></a>
 <a name="start_link-1"></a>
 
 
 ### start_link/1 ###
 ### start_link/1 ###
 
 
 `start_link(Args) -> any()`
 `start_link(Args) -> any()`
 
 
-