Skip to content

Use a concurrent queue to wait for process completion#450

Merged
MaxDesiatov merged 1 commit into
mainfrom
maxd/process-concurrent-queue
Dec 12, 2023
Merged

Use a concurrent queue to wait for process completion#450
MaxDesiatov merged 1 commit into
mainfrom
maxd/process-concurrent-queue

Conversation

@MaxDesiatov

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@swift-ci test

@AndrewHoos AndrewHoos left a comment

Copy link
Copy Markdown

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

Comment thread Sources/TSCBasic/Process/Process.swift
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) December 12, 2023 17:07
@MaxDesiatov MaxDesiatov merged commit 91d1a0b into main Dec 12, 2023
@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