Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Guard semaphore release with try/finally in TestMcpStorage - #9390

#9390
Merged
glen-84 merged 1 commit into
mainChilliCream/graphql-platform:mainfrom
gai/guard-semaphore-releaseChilliCream/graphql-platform:gai/guard-semaphore-releaseCopy head branch name to clipboard
Mar 18, 2026
Merged

Guard semaphore release with try/finally in TestMcpStorage#9390
glen-84 merged 1 commit into
mainChilliCream/graphql-platform:mainfrom
gai/guard-semaphore-releaseChilliCream/graphql-platform:gai/guard-semaphore-releaseCopy head branch name to clipboard

Conversation

@glen-84

@glen-84 glen-84 commented Mar 18, 2026

Copy link
Copy Markdown
Member

Summary of the changes (Less than 80 chars)

  • Guard semaphore release with try/finally in TestMcpStorage.

Copilot AI review requested due to automatic review settings March 18, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the in-memory TestMcpStorage test implementation by ensuring semaphore releases always occur, even when dictionary updates throw, aligning the write paths with the existing read paths’ try/finally pattern.

Changes:

  • Wrap _promptSemaphore.Release() in try/finally in AddOrUpdatePromptAsync.
  • Wrap _toolSemaphore.Release() in try/finally in AddOrUpdateToolAsync.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glen-84
glen-84 merged commit cf775c2 into main Mar 18, 2026
127 checks passed
@glen-84
glen-84 deleted the gai/guard-semaphore-release branch March 18, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.