Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unreg_shared global property #133

Open
macpie opened this issue Feb 17, 2017 · 1 comment
Open

Cannot unreg_shared global property #133

macpie opened this issue Feb 17, 2017 · 1 comment

Comments

@macpie
Copy link

macpie commented Feb 17, 2017

Hi,

I have found that I can register a shared global property but cannot unregister it.

Here is what I have found in gproc_dist:

reg_shared({_,g,_} = Key, Value, Attrs) ->
    leader_call({reg, Key, Value, shared, Attrs, reg});
reg_shared(_, _, _) ->
    ?THROW_GPROC_ERROR(badarg).
unreg_shared({T,g,_} = Key) when T==c; T==a ->
    leader_call({unreg, Key, shared});
unreg_shared(_) ->
    ?THROW_GPROC_ERROR(badarg).

Looks like unreg_shared is limited to c and a when reg_shared as no limitation. Is This intended?

Thanks in advance!

@uwiger
Copy link
Owner

uwiger commented Jun 8, 2017

No, this is not intended. Nor does it make sense, of course, to allow you to register an object, but not unregister it. I note also that the documentation is wrong. There is no particular reason to restrict which types of resource can be registered as shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants