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

change tokio::sync::Mutex to tokio::sync::RwLock and use read()/write… #541

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

harrison-tin
Copy link
Collaborator

…() instead of lock()

Signed-off-by: Harrison Tin [email protected]

What this PR does / why we need it:
This PR changes the use of tokio::sync::Mutex to tokio::sync::RwLock (used by configMap and instanceMap). RwLock uses read()/write() depending on the action of the thread instead of lock() from Mutex.
It closes #376
Special notes for your reviewer:

If applicable:

  • this PR has an associated PR with documentation in akri-docs
  • this PR contains unit tests
  • added code adheres to standard Rust formatting (cargo fmt)
  • code builds properly (cargo build)
  • code is free of common mistakes (cargo clippy)
  • all Akri tests succeed (cargo test)
  • inline documentation builds (cargo doc)
  • all commits pass the DCO bot check by being signed off -- see the failing DCO check for instructions on how to retroactively sign commits

Copy link
Contributor

@kate-goldenring kate-goldenring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this!

@kate-goldenring
Copy link
Contributor

/version patch

@github-actions github-actions bot added the version/patch Patch version change is needed label Nov 22, 2022
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@adithyaj adithyaj merged commit 3ab6f3c into project-akri:main Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/patch Patch version change is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use tokio::sync::RwLock instead of tokio::sync::Mutex
3 participants