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(ext_py): fix busy-loop in task handling Python subprocesses #174

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

kkovaacs
Copy link
Contributor

@kkovaacs kkovaacs commented Mar 4, 2022

This change fixes a busy loop where the expiration of wait_before_spawning
wakes up the select!() again and again if the number of Python subprocesses
match what we're expecting.

The logic is now: check if the number of subprocesses matches expectations
once per second. Start one new subprocess if that's not the case.

This change fixes a busy loop where the expiration of wait_before_spawning
wakes up the select!() again and again if the number of Python subprocesses
match what we're expecting.

The logic is now: check if the number of subprocesses matches expectations
once per second. Start _one_ new subprocess if that's not the case.
Copy link
Member

@CHr15F0x CHr15F0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @kkovaacs ! Many thanks for spotting it 🔬 .

@kkovaacs kkovaacs merged commit 370f62c into main Mar 7, 2022
@kkovaacs kkovaacs deleted the krisztian/fix-extpy-busy-loop branch March 7, 2022 07:46
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.

3 participants