Skip to content

Commit

Permalink
clarified documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
uwiger authored and RJ committed Jul 9, 2012
1 parent a1b0f25 commit ce31d75
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/gproc_ps.erl
Expand Up @@ -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}}).
Expand All @@ -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
Expand Down

0 comments on commit ce31d75

Please sign in to comment.