Skip to content

fix: prevent release overflow#57

Open
apiipc wants to merge 1 commit into
vercel:mainfrom
apiipc:fix/release-overflow-check
Open

fix: prevent release overflow#57
apiipc wants to merge 1 commit into
vercel:mainfrom
apiipc:fix/release-overflow-check

Conversation

@apiipc
Copy link
Copy Markdown

@apiipc apiipc commented May 24, 2026

Summary

  • guard Sema#release() from adding more free tokens than the configured semaphore limit
  • add regression coverage for calling release() without a matching acquire()
  • add coverage that a valid release does not expand available concurrency beyond the limit

Closes #36

Verification

  • yarn test
  • yarn build

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.

.release() does not check actual token count

2 participants