@author Ulf Wiger @author Joseph Wayne Norton @doc Extended process dictionary == Introduction == Gproc is a process dictionary for Erlang, which provides a number of useful features beyond what the built-in dictionary has: An interesting application of gproc is building publish/subscribe patterns. Example:
subscribe(EventType) ->
    %% Gproc notation: {p, l, Name} means {(p)roperty, (l)ocal, Name}
    gproc:reg({p, l, {?MODULE, EventType}}).

notify(EventType, Msg) ->
    Key = {?MODULE, EventType},
    gproc:send({p, l, Key}, {self(), Key, Msg}).
Gproc has a QuickCheck test suite, covering a fairly large part of the local gproc functionality, although none of the global registry. It requires a commercial EQC license, but rebar is smart enough to detect whether EQC is available, and if it isn't, the code in gproc_eqc.erl will be "defined away". There is also an eunit suite, covering the basic operations for local and global gproc. == Building Edoc == By default, `./rebar doc` generates Github-flavored Markdown files. 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 Freiburg 2007 (Paper available here). @end