Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the controller/worker circular wait reported in issue #113 by decoupling periodic refresh selection from dispatch, allowing the controller to keep draining c.incoming while dispatching work.
Changes:
- Refactors
ctrlBackend.loop/periodicCheckso periodic checks return a dispatch queue that is drained while still servicingc.incoming. - Removes the old
sendWorkerhelper and moves “mark busy” intoperiodicCheck. - Adds a regression test that reproduces the deadlock scenario and verifies
Add()completes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| backend.go | Splits periodic check “select due work” from dispatch to avoid circular channel backpressure deadlock. |
| httprc_test.go | Adds a regression test for the periodic-check deadlock scenario described in issue #113. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Fixes #113
Decouple item dispatch from periodicCheck to break circular wait between c.outgoing and c.incoming.