Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ParallelKit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# graceful Ctrl+C/window-close handling for Windows PowerShell 5.1 and
# PowerShell 7.
#
# Version 3.5 - https://github.com/HalRiveria/PowerShell-ParallelKit
# Version 4.0 - https://github.com/HalRiveria/PowerShell-ParallelKit
# (Initialize-ParallelKit reports the version too: change both together. The
# module's manifest takes it from here.)
# Copyright (c) 2026 HalRiveria. MIT License: keep this notice with any copy;
Expand Down Expand Up @@ -1253,7 +1253,7 @@ function Initialize-ParallelKit {
$jobOk = Initialize-PkChildProcessJob
# The header's Version line: the version PR changes both, and the harness
# checks they match.
$version = [version]'3.5'
$version = [version]'4.0'
return [pscustomobject][ordered]@{ AbortHandler = $handlerOk; ChildProcessJob = $jobOk; Version = $version; StartMode = [PkChildProcessJob]::StartMode }
}

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Each one has built-in help: `Get-Help Invoke-PkProcessBatch -Full` shows its par

## Setup

Requires Windows, with Windows PowerShell 5.1 or PowerShell 7. Download `ParallelKit.ps1` from the [Releases page](https://github.com/HalRiveria/PowerShell-ParallelKit/releases) (this README describes version 3.5 and later), put it in your project, and dot-source it from your script:
Requires Windows, with Windows PowerShell 5.1 or PowerShell 7. Download `ParallelKit.ps1` from the [Releases page](https://github.com/HalRiveria/PowerShell-ParallelKit/releases) (this README describes version 4.0 and later), put it in your project, and dot-source it from your script:

```powershell
. "$PSScriptRoot\ParallelKit.ps1"
Expand All @@ -135,7 +135,7 @@ if ($pk.StartMode -eq 'NoJob') {

If you downloaded the file, Windows marks it as coming from the internet and your execution policy may refuse to load it. Run `Unblock-File .\ParallelKit.ps1` once to clear that.

If your machines only run signed scripts (the `AllSigned` execution policy), the file has to be signed with a certificate they trust. The release copy isn't signed.
If your machines only run signed scripts (the `AllSigned` execution policy), the file has to be signed with a certificate they trust. The release copy isn't signed, and neither is the module.

<details>
<summary>What Initialize-ParallelKit returns</summary>
Expand Down Expand Up @@ -164,14 +164,21 @@ Its public functions are imported globally, so they stay available for the rest

## As a module

The kit also comes as a module, built from `ParallelKit.ps1`: the same code, with `Import-Module` in place of dot-sourcing. To build it from a copy of this repository and import it:
The kit also comes as a module, built from `ParallelKit.ps1`: the same code, with `Import-Module` in place of dot-sourcing. To install it from the PowerShell Gallery and import it:

```powershell
Install-Module ParallelKit -Scope CurrentUser
Import-Module ParallelKit
```

Or build it from a copy of this repository:

```powershell
.\Build\New-ParallelKitModule.ps1 -OutputDirectory C:\Modules\ParallelKit
Import-Module C:\Modules\ParallelKit
```

With that `ParallelKit` folder somewhere on `$env:PSModulePath`, `Import-Module ParallelKit` finds it by name, and so does a call to any of its functions without importing it first. The rest of this README applies either way.
Installed, or built into a `ParallelKit` folder somewhere on `$env:PSModulePath`, `Import-Module ParallelKit` finds it by name, and so does a call to any of its functions without importing it first. The rest of this README applies either way.

<details>
<summary>If the import is refused</summary>
Expand Down
Loading