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

Use a concurrent queue to wait for process completion #450

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

MaxDesiatov
Copy link
Contributor

Calling blocking waitpid on Swift concurrency threads can cause freezes for async code when spawning too many processes with the existing Process API.

Also took this opportunity to group process-related files in the same directory.

Calling blocking `waitpid` on Swift concurrency threads can cause freezes for `async` code when spawning too many processes with the existing `Process` API.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

Copy link

@AndrewHoos AndrewHoos left a comment

Choose a reason for hiding this comment

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

Looks good. I am just wondering if there is an existing queue we can use

Sources/TSCBasic/Process/Process.swift Show resolved Hide resolved
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) December 12, 2023 17:07
@MaxDesiatov MaxDesiatov merged commit 91d1a0b into main Dec 12, 2023
3 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/process-concurrent-queue branch December 12, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants