Skip to content

return a lone pool error without a join - #15

Merged
umputun merged 3 commits into
masterfrom
waitworkers-bare-error
Oct 11, 2026
Merged

umputun merged 3 commits into
masterfrom
waitworkers-bare-error

Conversation

@umputun

@umputun umputun commented Oct 11, 2026

Copy link
Copy Markdown
Member

after #13 waitWorkers joined the errgroup result with the completion error on every path, so a single worker error came back from Close and Wait as a one-element join. errors.Is and errors.As still matched, but errors.Unwrap returned nil where it used to return the inner error. A lone error is now returned as is, and the two are joined only when both are set.

the other two commits are notes: CLAUDE.md gets the current rule for when the completion callback is skipped and the go.sum step for bumping examples, and docs/backlog/ gets three items left over from the review of #13.

waitWorkers joined the errgroup result with the completion error on every path, so
a single worker error came back as a one-element join and errors.Unwrap on the
result of Close or Wait returned nil where it used to return the inner error.

a lone error is now returned as is, and the two are joined only when both are set.
…DE.md

the error handling notes still said the pool completion callback is skipped only on
context.Canceled, which reads as the old lastErr check. It is skipped only when the
context passed to Go was cancelled.

also notes that go mod tidy in an example has to run with the replace line removed,
or it drops the pool checksums from go.sum.
Copilot AI balanced review requested due to automatic review settings October 11, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit 2d94016 into master Oct 11, 2026
4 checks passed
@umputun
umputun deleted the waitworkers-bare-error branch October 11, 2026 17:55
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