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

Allow assigning to semaphore limit. #215

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Mar 1, 2023

async-pool would benefit from being able to resize and increase the maximum limit, but to do this, increasing (or decreasing) the limit on a semaphore should be a well defined operation. The semantics are:

  • On increasing the limit, some tasks may be immediately resumed.
  • On decreasing the limit, some tasks may execute until the count is < than the limit.

Types of Changes

  • New feature.

Contribution

@ioquatix ioquatix force-pushed the semaphore-limit-assignment branch from ea40f2c to b5d708e Compare March 1, 2023 08:31
@ioquatix ioquatix merged commit 0347d89 into main Mar 1, 2023
@ioquatix ioquatix deleted the semaphore-limit-assignment branch March 1, 2023 08:37
ioquatix added a commit that referenced this pull request Mar 2, 2023
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.

1 participant