Skip to content

feat: add permit APIs and notification_capacity to HandlerCtx#40

Merged
prestwich merged 1 commit intomainfrom
feat/permit-apis
Feb 15, 2026
Merged

feat: add permit APIs and notification_capacity to HandlerCtx#40
prestwich merged 1 commit intomainfrom
feat/permit-apis

Conversation

@prestwich
Copy link
Member

Summary

  • Add NotifyPermit (borrowed) and OwnedNotifyPermit (owned) types that wrap tokio mpsc permits with a tracing span, providing synchronous send once a channel slot is reserved
  • Add permit, permit_owned, try_permit, try_permit_owned, permit_many, and try_permit_many methods to HandlerCtx for backpressure-aware notification sending
  • Add notification_capacity to expose the max channel capacity
  • Bump version 0.6.1 → 0.6.2

Test plan

  • cargo clippy -p ajj --all-features --all-targets passes
  • cargo clippy -p ajj --no-default-features --all-targets passes
  • cargo +nightly fmt clean
  • cargo t -p ajj — all 18 tests + 18 doc-tests pass

🤖 Generated with Claude Code

Expose backpressure-aware permit APIs on HandlerCtx that mirror
tokio's mpsc::Sender reserve surface. Users can now reserve channel
capacity before sending, with both borrowed and owned permit types.

New types: NotifyPermit, OwnedNotifyPermit
New methods: permit, permit_owned, try_permit, try_permit_owned,
permit_many, try_permit_many, notification_capacity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prestwich prestwich merged commit afe9fbb into main Feb 15, 2026
6 checks passed
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