Skip to content

Move to async implementations of UserToolchain.init and SwiftSDK.hostSwiftSDK - #9251

Draft
plemarquand wants to merge 5 commits into
swiftlang:mainfrom
plemarquand:async-usertoolchain-swiftsdk
Draft

plemarquand wants to merge 5 commits into
swiftlang:mainfrom
plemarquand:async-usertoolchain-swiftsdk

Conversation

@plemarquand

Copy link
Copy Markdown
Contributor

Both methods previously made calls to the version of AsyncProcess.popen that blocks the calling thread, forcing consumers to either block or implement workarounds to hop off the calling thread, if they were calling from MainActor.

This patch switches to the async version of AsyncProcess.popen and converts callers to use them, marking the required call sites as async and awaiting them.

@plemarquand
plemarquand force-pushed the async-usertoolchain-swiftsdk branch from 387cb78 to 9ee10c2 Compare October 15, 2025 14:05
@plemarquand
plemarquand force-pushed the async-usertoolchain-swiftsdk branch 6 times, most recently from ff43faa to 01419ce Compare October 15, 2025 23:51
@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@plemarquand
plemarquand force-pushed the async-usertoolchain-swiftsdk branch from ac0ac36 to c93aa44 Compare October 21, 2025 12:26
@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@plemarquand
plemarquand force-pushed the async-usertoolchain-swiftsdk branch from c93aa44 to a60b1a6 Compare November 11, 2025 01:51
@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

Both methods previously made calls to the version of
`AsyncProcess.checkNonZeroExit` that blocks the calling thread,
forcing consumers to either block or implement workarounds to hop
off the calling thread.

This patch adds async versions of these methods and ports most
usages to use them, marking the required call sites as async and
awaiting them.
@plemarquand
plemarquand force-pushed the async-usertoolchain-swiftsdk branch from a60b1a6 to d13c06e Compare November 26, 2025 20:51
@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@plemarquand

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

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