Uh oh!
There was an error while loading. Please reload this page.
feat: add TaskSemaphore utility - #675
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds ChangesTaskSemaphore utility
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.
navedmerchant
left a comment
There was a problem hiding this comment.
Code review notes — two low-severity suggestions for the test suite (L1, L2). Implementation logic is correct; these are about test robustness and contract coverage.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Related GitHub Issue
Closes: #362
Description
Adds
TaskSemaphore, a small wrapper around the existingasync-mutexSemaphoredependency for task concurrency control.Key behavior:
availablevia the underlying semaphore valuewaitingfor queued acquire observabilityacquire()cancel()The wrapper keeps
waitingscoped to actual queued acquires: immediate acquires are not counted, andcancel()resets the local waiting count synchronously while guarding stale rejection continuations with a generation token.Test Procedure
Ran the focused utility test:
Result: 7 tests passed.
Pre-Submission Checklist
Screenshots / Videos
Not applicable; this is a utility-only change.
Documentation Updates
Additional Notes
This is part of #356, Epic 1: Foundation.
Summary by CodeRabbit