Skip to content
Merged
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Other pieces: `Request-PkAbort` triggers the same abort from code. `Test-PkAbort
- Windows only (console and Job Object APIs), on Windows PowerShell 5.1 or PowerShell 7.
- Run it in a PowerShell console window or an editor's terminal (graceful Ctrl+C tested in Windows Terminal, Visual Studio's built-in terminal and VS Code's terminal, including the PowerShell extension's). The Windows PowerShell ISE isn't supported: tested there, the kit loads and runs, but the ISE has no console, so Ctrl+C stops the script outright, with no graceful drain and no cleanup callbacks.
- It needs FullLanguage mode, since it compiles a little C# with `Add-Type` when loaded. On a machine locked down to Constrained Language Mode (usually by AppLocker or Windows Defender Application Control), loading it fails with a message saying so. Some endpoint security products also flag scripts that compile code calling Windows APIs at runtime; if yours blocks the kit, that's the likely reason.
- After changing `ParallelKit.ps1` itself, start a new PowerShell window. A session keeps the kit's compiled parts until it closes; the kit tells you if it finds an older copy loaded.
- After updating the kit, or changing `ParallelKit.ps1` yourself, start a new PowerShell window. A session keeps the kit's compiled parts until it closes, and the kit tells you if a different version's are already loaded.
- One `Invoke-PkRun` at a time per PowerShell process: a call made while one is already running, nested or from another runspace, just runs inside it. Several dispatchers can run at once inside one run (one per runspace job, say); they share its abort state and can share a `SemaphoreSlim` to enforce a combined concurrency limit.
- A worker stuck inside a long .NET call can't be interrupted. Force-stop stops waiting for it and returns. The worker is NOT killed: once that call returns it can carry on to the end of its script. Before any step that can't be undone (deleting a source file, say), have the worker check `Test-PkCancelRequested` and skip the step if it's true.
- Programs run hidden, and there's no way to send them input. A program that reads its stdin finds it empty, so one that stops to ask a question usually gives up or takes its default. One that reads the keyboard directly (through a console of its own) sits there until it's killed, as does one that waits on your script's stdin under `-InheritStdin`. `timeout.exe` won't run at all without `-InheritStdin` and a console; see [Run a list of programs](#run-a-list-of-programs).
Expand Down Expand Up @@ -714,7 +714,7 @@ GitHub runs the same harness on Windows PowerShell 5.1 and on PowerShell 7 for e
- `Testing/stop-in-call/run.ps1` shows where PowerShell acts on a stop (a third Ctrl+C, or the runspace engine's force-stop): never inside a .NET call, which runs to the end, and only at the next function or cmdlet call. That's behind the Limits note on workers stuck in a .NET call.
- `Testing/readme-examples/run.ps1` runs this README's code examples, read straight from it, with and without StrictMode, and checks they do what it says. The group example also runs with both kinds of Ctrl+C. It needs `cjxl.exe` on `PATH`, since the examples use it. Under a minute.
- `Testing/ps7-native/run.ps1` shows, without the kit, what PowerShell 7 does in the cases [Who it's for](#who-its-for) lists: a killed script leaves its programs running, `ForEach-Object -Parallel -TimeoutSeconds` doesn't stop a running program, and Ctrl+C stops running programs at once. Run it with `pwsh`. About half a minute.
- `Testing/soak/run.ps1` runs 15,000 programs and 6,000 runspace jobs, round by round, and fails if PowerShell's handles, threads or memory keep growing. It takes about three minutes.
- `Testing/soak/run.ps1` runs 15,000 programs and 6,000 runspace jobs, round by round, and fails if PowerShell's handles, threads or memory keep growing. It takes about three minutes on PowerShell 7, and five on 5.1.

</details>

Expand Down
Loading