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

allowing multiple calls to cxy_ctl:init/1 #8

Closed

Conversation

marcelog
Copy link

Hey :)

I have the following use case, where an application has multiple dependencies trying to set their own concurrency limits. I've figured that it wouldn't hurt to allow multiple calls to cxy_ctl:init/1, so each dependency could allow its own concurrency limits along the way (and/or adding limits when needed, instead of being a one-time only operation).

Makes sense?

@jaynel
Copy link
Member

jaynel commented Feb 6, 2014

This issue will be resolved using three separate calls:

  1. init => create cxy_ctl ets table and setup initial limits (or none if [] passed in)
  2. add_task_types => only add new non-existing task type limits
  3. remove_task_types => only remove existing task type limits

Removing a task type will cause crashes if you continue to try to run tasks of that type (or have existing tasks that have not completed yet).

New issues will be opened for the following items:

  1. adjust_task_limits => sets new concurrency limits for a task type
  2. remove_task_types should safely
    a) set limit to 0
    b) remove the type when the active count goes to 0 for both inline and spawned processes

@jaynel
Copy link
Member

jaynel commented Feb 6, 2014

Fixed by #21

@jaynel jaynel closed this Feb 6, 2014
jaynel pushed a commit to jaynel/epocxy that referenced this pull request Jan 6, 2016
TS-1223 Slow cxy fix combining spawn and execution times
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

Successfully merging this pull request may close these issues.

2 participants