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

check async atomic-based mutexes #13

Open
jimy-byerley opened this issue Jul 14, 2023 · 0 comments
Open

check async atomic-based mutexes #13

jimy-byerley opened this issue Jul 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@jimy-byerley
Copy link
Owner

At the moment

  • we are using a lot of std::sync::Mutex in RawMaster and some other places, they are not never held long so they should not perturbate the async flow, however it is unclear what their locking/unlocking performance cost is.
  • we are using tokio::sync::Mutex in Group and in crates using etherage. they are meant to not perturbate the async flow, but their locking/unlocking cost can be high since they are relying on a std::sync::Mutex that is locked/unlocked at each poll.

to investigate

We should see if it is possible to replace both of them with a home-made async mutex implemented with atomics, so polling it would only be an atomic read

@jimy-byerley jimy-byerley added enhancement New feature or request question Further information is requested labels Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants