Repository navigation
v1.0
First release of ParallelKit: run command-line programs, or blocks of PowerShell code, in parallel from Windows PowerShell 5.1, and stop cleanly on Ctrl+C. One file, nothing to install.
Invoke-PkProcessBatchruns a list of external programs, a set number at a time, with their output captured.Invoke-PkProcessDispatchdoes the same for work that comes in groups, with retries and a step when each group finishes.Invoke-PkRunspaceJobsruns PowerShell worker code in parallel runspaces.Test-PkWorkerSafetyand-CheckWorkerSafetycheck worker code against the kit's rules.Invoke-PkProcessWithTimeout,Start-PkProcess,Wait-PkProcessandComplete-PkProcesshandle single programs.Invoke-PkRunmakes Ctrl+C graceful: running work finishes, then the run stops. It also keeps the PC from idle-sleeping and turns off QuickEdit for the length of the run.- Programs the script started are killed with it, even if the script is force-closed.
Download ParallelKit.ps1 below and dot-source it. Requires Windows PowerShell 5.1. See the README for usage.