Repository navigation
Bring drifted copies back in step, and fix comments that no longer match the code - #132
Merged
Merged
Conversation
…t leaves something running Every kill path for one program now goes through Stop-PkProgramTree: the time-limit kill, -KillTreeOnExit, Invoke-PkProcessWithTimeout's kills and a failed start's rollback. The two rollbacks (a reader that can't start, a -JobStarter that throws after starting its program) share Stop-PkFailedStartTree, and when Windows won't end the program's tree job, or an exited program has none, the start's failure now says what it started may still be running instead of that it was stopped. Invoke-PkProcessWithTimeout's cleanup uses the force-stop's steps.
Invoke-PkRunspaceBatch's -MaxConcurrent error now says what it got, as the other engines' do; every -StreamTimeoutMs default of 15000 names the other three; and the comments on Start-PkProcessCore's four job keys say they're copied in three places, not four.
…wo help lines The note on Start-PkProcessCore's result no longer says it builds it in two places; PkState's note says why it's static instead of pointing at a note the C# file doesn't have; the TypesVersion note says once per release; KillTree's notes name Stop-PkProcessTree as what falls back to taskkill; Invoke-PkProcessWithTimeout's cleanup has one comment instead of two; and a comment that cited a review finding stands on its own.
# Conflicts: # ParallelKit.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
Copies of the same logic had drifted apart, and some comments no longer matched the code:
Invoke-PkRunspaceBatch's-MaxConcurrenterror didn't say what it got, as the other engines' errors do.Start-PkProcessCorereturns said it builds them in two places and that they're copied in four. It's one place, copied in three.-StreamTimeoutMsdefault of 15000 named three of the four places that use it.PkState's note pointed at "the note at the top of this file", which the C# file doesn't have since the C# moved toSource/.TypesVersionnote said to bump it on any change to "this file". It's once per release, for any of the kit's C#.KillTree's notes said "the caller then uses taskkill"; onlyStop-PkProcessTreedoes.Invoke-PkProcessWithTimeout's cleanup had two back-to-back comment blocks.Stop-PkFailedStartTreehad atry/catcharound readingProcess.Id, which can't throw: a disposedProcessreads$null.What changed
-MaxConcurrenterror now says what it got.try/catchis gone.The C# changes are comments only, copied into
ParallelKit.ps1withBuild/Update-ParallelKitCSharp.ps1. No other behavior changes.How it was tested
main, since merging End a program's tree through one function, and say when a failed start leaves something running #131's squash added nothing else.Build/Update-ParallelKitCSharp.ps1 -Compilebuilds the C# with no warnings, and-Checkpasses.