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

Virtual thread support for sync api's #3085

Open
luvk1412 opened this issue Dec 17, 2024 · 0 comments
Open

Virtual thread support for sync api's #3085

luvk1412 opened this issue Dec 17, 2024 · 0 comments

Comments

@luvk1412
Copy link

Feature Request

Is your feature request related to a problem? Please describe

I am writing a server which would run on virtual threads and i am also using lettuce sync api's in my app. On a quick search i can see there are usages of synchronized in the code ( check here ), I am worried that these usages can lead to platform thread pinning especially the usages in MasterReplicaConnectionProvider.java, I am not sure about the fact if platform thread would pin, as i am not aware if the methods using synchronized would run on eventloop or the virtual thread in some case, so please correct me if I am wrong here.
In case these usages are potential cause for thread pinning, it would be great if we can remove those usages and make library virtual thread compatible.

Describe the solution you'd like

Replace synchronized with ReentrantLock as done in spring-projects/spring-data-redis#2690 as well.

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

No branches or pull requests

1 participant