File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/app/Fake.Core.Process Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -600,11 +600,25 @@ module Process =
600600
601601 let startRawSync ( processStarter : IProcessStarter ) c = ( startRaw processStarter c) .Result
602602
603- let startAndAwait ( processStarter : IProcessStarter ) c =
603+ /// Async version: Starts process and awaits completion without blocking
604+ /// Preferred over 'run' for async workflows to avoid blocking thread pool threads
605+ let startAndAwaitAsync ( processStarter : IProcessStarter ) c =
604606 start processStarter c |> Async.AwaitTaskWithoutAggregate
605607
608+ /// Legacy: Starts process and awaits completion (blocking)
609+ /// For backward compatibility - prefer startAndAwaitAsync in new code
610+ let startAndAwait ( processStarter : IProcessStarter ) c =
611+ startAndAwaitAsync processStarter c |> Async.RunSynchronously
612+
613+ /// Async version: Starts process and runs it to completion without blocking
614+ /// Preferred over 'run' for async workflows
615+ let runAsync ( processStarter : IProcessStarter ) c =
616+ startAndAwaitAsync processStarter c
617+
618+ /// Legacy: Starts process and runs it to completion (blocking)
619+ /// For backward compatibility - prefer runAsync in new code
606620 let run ( processStarter : IProcessStarter ) c =
607- startAndAwait processStarter c |> Async.RunSynchronously
621+ runAsync processStarter c |> Async.RunSynchronously
608622
609623 let defaultEnvVar = ProcStartInfoData.defaultEnvVar
610624
You can’t perform that action at this time.
0 commit comments