Skip to content

v1.0

Choose a tag to compare

@HalRiveria HalRiveria released this 27 Oct 23:40
· 34 commits to main since this release
94360c1

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-PkProcessBatch runs a list of external programs, a set number at a time, with their output captured.
  • Invoke-PkProcessDispatch does the same for work that comes in groups, with retries and a step when each group finishes.
  • Invoke-PkRunspaceJobs runs PowerShell worker code in parallel runspaces. Test-PkWorkerSafety and -CheckWorkerSafety check worker code against the kit's rules.
  • Invoke-PkProcessWithTimeout, Start-PkProcess, Wait-PkProcess and Complete-PkProcess handle single programs.
  • Invoke-PkRun makes 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.