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

Replace tokio mutex with std mutex #1062

Open
ghost opened this issue Aug 30, 2023 · 2 comments
Open

Replace tokio mutex with std mutex #1062

ghost opened this issue Aug 30, 2023 · 2 comments
Labels
server Issues regarding the server component

Comments

@ghost
Copy link

ghost commented Aug 30, 2023

IMHO, I suggest that replacing tokio::sync::Mutex with std::sync::Mutex can potentially lead to better performance outcomes. This assertion is based on the design differences between the two mutex implementations, particularly in asynchronous contexts.

For further insights, check out the following resources:

Discussion on this topic. Never use Tokio mutexes.
tokio::sync::Mutex documentation.

@tasn
Copy link
Member

tasn commented Sep 1, 2023

Please feel free to open a PR!

@tasn tasn closed this as completed Sep 1, 2023
@tasn tasn reopened this Sep 1, 2023
@tasn
Copy link
Member

tasn commented Sep 1, 2023

Whoops, didn't mean to close it. :)

@tasn tasn added good first issue server Issues regarding the server component labels Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Issues regarding the server component
Projects
None yet
Development

No branches or pull requests

2 participants