[erlang-questions] Confusing about gproc with global properties

Gregory Haskins gregory.haskins@REDACTED
Sat Apr 16 02:52:32 CEST 2011

On 4/15/11 5:25 PM, Ulf Wiger wrote:
> Hi Greg,
> Yeah, gproc:select/1 is a bit confusing.
> It is actually equivalent to gproc:select(all, Pat), where the first argument is the type (names, properties, etc.) - not the scope.
> Not that you'd know this from reading the docs, but you can do this:
> (n1@REDACTED)21> gproc:select({global,all},[{'_',[],['$$']}]).      
> [[{p,g,foo},<0.37.0>,bar]]
> (n1@REDACTED)22> gproc:select({local,all},[{'_',[],['$$']}]). 
> [[{p,l,foo},<0.37.0>,bar]]
> (n1@REDACTED)23> gproc:select({all,all},[{'_',[],['$$']}]).  
> [[{p,g,foo},<0.37.0>,bar],[{p,l,foo},<0.37.0>,bar]]
> The {Scope, Type} tuple is, I think wholly undocumented.
> I'll go over the type specs and the documentation on that one. Thanks for highlighting it.

Thanks Ulf, worked like a champ!  And the schema translates to the QLC
interface, too, I see.  I have now officially converted over to using gproc:


Thanks for the help, and the great library.

Kind Regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110415/8ab67af8/attachment.bin>

More information about the erlang-questions mailing list