Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReconnectingConnection: Use sync mutex. #317

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

shachlanAmazon
Copy link
Contributor

Since the mutex is never held across an await point, there's no need for an async mutex.

Since the mutex is never held across an await point, there's no need for
an async mutex.
@barshaul
Copy link
Collaborator

@shachlanAmazon Whats the benefits of moving to a sync mutex? (as it might cause issues if we'll add an await later on..)

@shachlanAmazon
Copy link
Contributor Author

https://github.com/barshaul/babushka/pull/315/files#diff-999a5f4b6c96fc9bda6ffc9fee8bc9d69d33d2fb44cf7cbc929c2b08aa608357

It allows us to make the reconnect and is_connected functions sync

(also, presumably it's cheaper to use a sync mutex, but that's not the point of the PR)

@shachlanAmazon shachlanAmazon merged commit c3640dc into valkey-io:main Jul 26, 2023
8 checks passed
@shachlanAmazon shachlanAmazon deleted the mutex branch July 27, 2023 15:53
acarbonetto pushed a commit that referenced this pull request May 29, 2024
* Python: add OBJECT REFCOUNT command (#317)

* PR suggestions
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.

2 participants