Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clarified documentation

  • Loading branch information...
commit 9c08011829bc429670e97e4e146ac3006136d507 1 parent e8aaa4f
@uwiger uwiger authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 src/gproc_ps.erl
View
16 src/gproc_ps.erl
@@ -64,11 +64,15 @@
-spec subscribe(scope(), event()) -> true.
%% @doc Subscribe to events of type `Event'
%%
-%% Any messages published with `gproc_ps:publish(Scope, Event, Msg)' will be delivered to
-%% the current process, along with all other subscribers.
+%% Any messages published with `gproc_ps:publish(Scope, Event, Msg)' will be
+%% delivered to the current process, along with all other subscribers.
%%
-%% This function creates a property, `{p,Scope,{gproc_ps_event,Event}}', which can be
-%% searched and displayed for debugging purposes.
+%% This function creates a property, `{p,Scope,{gproc_ps_event,Event}}', which
+%% can be searched and displayed for debugging purposes.
+%%
+%% Note that, as with {@link gproc:reg/1}, this function will raise an
+%% exception if you try to subscribe to the same event twice from the same
+%% process.
%% @end
subscribe(Scope, Event) when Scope==l; Scope==g ->
gproc:reg({p,Scope,{?ETag, Event}}).
@@ -95,6 +99,10 @@ subscribe(Scope, Event) when Scope==l; Scope==g ->
%%
%% This means that `Cond=undefined' and ``Cond=[{'_',[],[true]}]'' are
%% equivalent.
+%%
+%% Note that, as with {@link gproc:reg/1}, this function will raise an
+%% exception if you try to subscribe to the same event twice from the same
+%% process.
%% @end
subscribe_cond(Scope, Event, Spec) when Scope==l; Scope==g ->
case Spec of
Please sign in to comment.
Something went wrong with that request. Please try again.