Repository navigation
fix(service): Start's teardown does not close the inbound channel (follow-up of #4) - #7
Merged
Merged
Conversation
- a Publish/Trigger holding the channel could pick the send over ctx.Done and panic (send on closed channel); the field is set to nil, senders end on ctx.Done - action subscribers get subscriberBuffer (64) like event subscribers (was 1) - TestEventTypeService: the receive has a 10 s timeout - test: 64 senders racing cancel(), 300 rounds: panics before, passes after
inkly
approved these changes
Oct 24, 2026
inkly
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this fixes it: the new test panics on main and passes here, and senders already return through ctx.Done. The subscriber buffer and the receive timeout are welcome too. Optional nit: TestEventsPublishedTogetherAllArrive could use Ready() instead of polling s.stop. Approving. We'll squash-merge with a plain commit message.
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.
Follow-up of #4 (review).
Publish/Triggerholding it could pick the send overctx.Doneand panic (send on closed channel); senders end onctx.DonesubscriberBuffer(64), as event subscribers (was 1)TestEventTypeService: receive with a 10 s timeoutTestSendersRacingTheEndOfStartDoNotPanic: 64 senders racingcancel(), 300 rounds → panics on main, passes here;go test -race ./...green