Skip to content

Comments

Refactor locking mechanism to use asyncio.Lock for asynchronous container initialization#185

Merged
cleemullins merged 1 commit intomainfrom
users/cleemullins/CosmosDbThreading
Oct 21, 2025
Merged

Refactor locking mechanism to use asyncio.Lock for asynchronous container initialization#185
cleemullins merged 1 commit intomainfrom
users/cleemullins/CosmosDbThreading

Conversation

@cleemullins
Copy link
Collaborator

Fixes #184

@cleemullins cleemullins requested a review from a team as a code owner October 20, 2025 22:19
Copilot AI review requested due to automatic review settings October 20, 2025 22:19
Copy link
Contributor

Copilot AI left a comment

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 refactors the locking mechanism in CosmosDBStorage from threading.Lock to asyncio.Lock to properly support asynchronous container initialization, addressing issue #184.

Key Changes:

  • Replaced threading.Lock with asyncio.Lock for thread-safe asynchronous operations
  • Updated lock acquisition syntax from with to async with to match asyncio patterns
  • Updated inline comment to reflect asynchronous context

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cleemullins cleemullins self-assigned this Oct 21, 2025
@cleemullins cleemullins merged commit 735164d into main Oct 21, 2025
10 checks passed
@cleemullins cleemullins deleted the users/cleemullins/CosmosDbThreading branch October 21, 2025 20:42
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.

Concurrency locking issue in CosmosDB Storage Provider

2 participants