Skip to content

Audit uses of Mutex or RwLock for performance #186

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

Closed
leoyvens opened this issue Jul 23, 2018 · 3 comments
Closed

Audit uses of Mutex or RwLock for performance #186

leoyvens opened this issue Jul 23, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request p3 performance

Comments

@leoyvens
Copy link
Collaborator

leoyvens commented Jul 23, 2018

Any form of synchronous locking may degrade the performance of the tokio thread pool as it will block the whole thread, we should try replace with something that does not lock at all. Some of our mutexes are may be unnecessary, one way to replace them is by using a oneshot channel internally and returning a future corresponding to the receiver.

@leoyvens leoyvens self-assigned this Jul 23, 2018
@leoyvens leoyvens changed the title Refactor away uses of Mutex or RwLock Audit uses of Mutex or RwLock Aug 21, 2018
@leoyvens leoyvens changed the title Audit uses of Mutex or RwLock Audit uses of Mutex or RwLock for performance Aug 21, 2018
@lutter
Copy link
Collaborator

lutter commented May 13, 2019

Is this still needed?

@leoyvens leoyvens added the p3 label May 13, 2019
@leoyvens
Copy link
Collaborator Author

@lutter Yes, the motivation is the same as #905, but this one has much less impact.

@Jannis Jannis added the enhancement New feature or request label Nov 11, 2019 — with Leander Project
@leoyvens
Copy link
Collaborator Author

leoyvens commented May 4, 2020

This is old and we haven't had issues related to this. And the recommendation is to prefer the synchronous locks in short critical sections that do not block tokio-rs/tokio#2479 (comment). So closing.

@leoyvens leoyvens closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3 performance
Projects
None yet
Development

No branches or pull requests

4 participants