Skip to content

Help and comment cleanup: -Cts cancel note, reasons on empty catches, dead null check - #53

Merged
HalRiveria-Bot merged 1 commit into
mainfrom
chore/help-and-catch-comments
Nov 17, 2026
Merged

HalRiveria-Bot merged 1 commit into
mainfrom
chore/help-and-catch-comments

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

No behavior change.

  • -Cts help: Invoke-PkRunspaceJobs cancels the caller's own -Cts whenever it exits with workers still running (one of your callbacks throwing, say), so a worker that checks Test-PkCancelRequested is told. The help only mentioned an abort; it now says both.
  • Empty catches: each swallow-all catch { } in the dispatcher's force-stop, teardown and never-started cleanup, and in Invoke-PkRunspaceJobs' teardown, gets a one-line reason.
  • Dead check removed: the -JobParams entry N is null check in Invoke-PkRunspaceJobs couldn't fire, because the list is normalized first and a $null entry already fails there as "not a hashtable".

Tested: a new harness assertion pins that a $null -JobParams entry is still refused with a message naming it. It passes before and after. Full harness passes on Windows PowerShell 5.1 and PowerShell 7.

🤖 Generated with Claude Code

… dead null check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria-Bot
HalRiveria-Bot merged commit 9d100df into main Nov 17, 2026
2 checks passed
@HalRiveria-Bot
HalRiveria-Bot deleted the chore/help-and-catch-comments branch November 17, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants