8000 cyclic: make task startup and stop asynchronous by tomrford · Pull Request #87 · tomrford/gocan · GitHub
[go: up one dir, main page]

Skip to content

cyclic: make task startup and stop asynchronous - #87

Merged
tomrford merged 2 commits into
mainfrom
cyclic-async-lifecycle
Sep 24, 2026
Merged

tomrford merged 2 commits into
mainfrom
cyclic-async-lifecycle

Conversation

@tomrford
@tomrford tomrford commented Sep 24, 2026 •
Copy link
Copy Markdown
Owner

Restarting cyclic messages sequentially can block the caller on each initial send timeout. Start and StartFunc now validate arguments and launch the first attempt in the task goroutine. Execution failures, including first-attempt failures, close Done() and are reported by Err().

This intentionally changes the lifecycle contract: Stop() requests cancellation and returns without waiting. Callers requiring completed shutdown must call Stop() and then receive from Done(). Existing signatures remain, so consumers must audit timing assumptions and startup error handling. Scheduling and bounded queue-full retries retain their existing behaviour.

Updated lifecycle tests cover blocked first sends and callbacks, initial failures, callback-initiated stop, cancellation before startup, argument validation, and scheduling/retry behaviour.

Validation passed on commit 105c6fc:

  • go test -race ./...
  • go vet ./...
  • gofmt -l . and git diff --check
  • Windows amd64, arm64 and 386 compile checks with CGO_ENABLED=0 GOOS=windows GOARCH=<arch> go test -exec=true ./...

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 24, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T12:35:31.981586Z 105c6fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tomrford
tomrford merged commit 9f6fc7d into main Sep 24, 2026
1 check passed
@tomrford
tomrford deleted the cyclic-async-lifecycle branch September 24, 2026 12:45
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.

1 participant

0