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

ReentrantLock instead of synchronized #1095

Merged
merged 4 commits into from
Mar 14, 2024
Merged

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Mar 4, 2024

  • Use ReentrantLock in place of synchronized since it's better for virtual threads and equally if not more performant.
  • Ensure consumer context implementation is thread safe and switch to reentrant lock instead of synchronized.

@scottf scottf changed the title Consumer context thread safety ReentrantLock instead of synchronized Mar 9, 2024
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit 9d5fb0a into main Mar 14, 2024
4 checks passed
@scottf scottf deleted the more-threadsafe-consumer-context branch March 14, 2024 17:39
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