Async API for Process (+ Fantomas)#2884
Open
Numpsy wants to merge 2 commits into
Open
Conversation
Contributor
Collaborator
|
Do we need those wrappers that perform sync operations? |
There was a problem hiding this comment.
Pull request overview
This PR aims to introduce an Async-friendly API surface for process execution in Fake.Core.Process, reducing reliance on Async.RunSynchronously for library consumers.
Changes:
- Added
startAndAwaitAsyncandrunAsyncimplementations in the internalProcess.Procmodule. - Rewired
runto delegate throughrunAsyncbefore callingAsync.RunSynchronously. - Changed
startAndAwaitto a blocking implementation (viaAsync.RunSynchronously).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+603
to
+612
| /// Async version: Starts process and awaits completion without blocking | ||
| /// Preferred over 'run' for async workflows to avoid blocking thread pool threads | ||
| let startAndAwaitAsync (processStarter: IProcessStarter) c = | ||
| start processStarter c |> Async.AwaitTaskWithoutAggregate | ||
|
|
||
| /// Legacy: Starts process and awaits completion (blocking) | ||
| /// For backward compatibility - prefer startAndAwaitAsync in new code | ||
| let startAndAwait (processStarter: IProcessStarter) c = | ||
| startAndAwaitAsync processStarter c |> Async.RunSynchronously | ||
|
|
Contributor
Author
|
This is just #2880 but run through Fantomas - should discussions about the idea be over there? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This just #2880 but with an extra commit to run Fantomas