Skip to content

Skip queued callbacks after a group error - #17

Merged
umputun merged 1 commit into
go-pkgz:masterfrom
bensynapse:fix-queued-termination
Oct 3, 2026
Merged

umputun merged 1 commit into
go-pkgz:masterfrom
bensynapse:fix-queued-termination

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

I run Live Tennis API.

With NewErrSizedGroup(1, TermOnErr), a callback waiting for capacity currently runs even after the active callback returns an error.
The termination check now runs after semaphore acquisition, so queued callbacks see errors recorded while they were waiting.
Already running callbacks can still finish.

The regression reproduces the bug before the fix.
It covers both locking modes and execution without TermOnErr, and checks that skipped callbacks release their permits.

Verified on Go 1.23.4 with TZ=America/Chicago go test -timeout=60s -race -covermode=atomic -coverprofile=profile.cov ./....
The suite passes with 99.1% statement coverage. The new test passes 50 race runs.
go build -race ./... and go vet ./... pass. golangci-lint run --timeout=3m reports zero issues.

@bensynapse
bensynapse requested a review from umputun as a code owner October 3, 2026 09:01

@umputun umputun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@umputun
umputun merged commit c674432 into go-pkgz:master Oct 3, 2026
1 check passed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 37111638545

Coverage remained the same at 98.87%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 3 of 3 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 177
Covered Lines: 175
Line Coverage: 98.87%
Coverage Strength: 1955.24 hits per line

💛 - Coveralls

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.

3 participants