[erlang-questions] Confusing about gproc with global properties

Gregory Haskins gregory.haskins@REDACTED
Mon Apr 18 17:29:40 CEST 2011

On 4/16/11 3:39 PM, Ulf Wiger wrote:
> Thinking about it, I'd like to change gproc:select/1 to also include global objects, in other words:
> select(Pat) -> select({all, all}, Pat).
> This is a backwards incompatible change, but I am guessing that not too many people use the global gproc functionality yet, so this should be the time to do it.
> Any objections?

Sounds good to me (of course, I am biased given I do not have any legacy
gproc code ;)

FYI: While investigating this problem I noticed there is an
inconsistency in the QLC interface.  That is:

P <- gproc:table(props) returns both [g,l] matches, whereas

{{p, '_', Key}, Pid, Val} <- gproc:table(props)


{{p, Scope, Key}, Pid, Val} <- gproc:table(props)

return only local scope matches (as I would expect given my new
understanding of "props =:= {local, props}" in the current code base).
I would expect all three forms to return a consistent set ([l] based in
this case, [g,l] after your proposed change).

FWIW: The latter two invoke
https://github.com/esl/gproc/blob/v0.1.2/src/gproc.erl#L1150, whereas
the first form takes a different path due to the way the QLC code builds
the matchhead as an is_var().

I'll take a crack at fixing it and send you a patch, unless this is
considered FAD?

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/20110418/7d1b5b55/attachment.bin>

More information about the erlang-questions mailing list