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

Add cxy_ctl_sup to properly own ets tables #23

Open
jaynel opened this issue Feb 16, 2014 · 0 comments
Open

Add cxy_ctl_sup to properly own ets tables #23

jaynel opened this issue Feb 16, 2014 · 0 comments

Comments

@jaynel
Copy link
Member

jaynel commented Feb 16, 2014

Calling cxy_ctl:init or cxy_ctl:add_task_types causes a new ets_table to be created. The caller will be the owner of the ets table. If a client application calls these library functions from the wrong process, the ets table might get deleted accidentally when the caller's process terminates.

To make the library safer to use, a supervisor should be provided that starts a gen_server dedicated to owning the ets tables. The API for this gen_server should support creating and adjusting the limits, but leave it up to the client to directly call the cxy_ctl functions for executing tasks.

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

1 participant