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

fix: don't deadlock when lots of async reactors are sharing a concurrency pool. #36

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

jimsynz
Copy link
Contributor

@jimsynz jimsynz commented Jul 17, 2023

No description provided.

@jimsynz jimsynz requested a review from zachdaniel July 17, 2023 00:34
@jimsynz jimsynz self-assigned this Jul 17, 2023
@jimsynz jimsynz force-pushed the fix/shared-concurrency-deadlock branch 4 times, most recently from 628ea16 to 16d75db Compare July 17, 2023 01:41
@zachdaniel
Copy link
Contributor

Some notes from a discussion:

state.current_tasks needs to not be used anywhere to limit, we should instead atomically "claim X or fewer available concurrency limit" and then start those tasks. And state.current_tasks is just for us to track what is currently running, not playing a part in the concurrency limit calculation.

@jimsynz jimsynz force-pushed the fix/shared-concurrency-deadlock branch from 16d75db to 2d48eee Compare September 27, 2023 21:25
@jimsynz jimsynz force-pushed the fix/shared-concurrency-deadlock branch from 2d48eee to c4c49ba Compare September 27, 2023 21:59
@jimsynz jimsynz force-pushed the fix/shared-concurrency-deadlock branch from c4c49ba to d894b79 Compare September 27, 2023 22:01
@jimsynz jimsynz merged commit 4a57a92 into main Sep 27, 2023
@jimsynz jimsynz deleted the fix/shared-concurrency-deadlock branch September 27, 2023 22:09
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