Skip to content

Replace synchronized blocks with ReentrantLocks for virtual thread support#2656

Open
omercelikceng wants to merge 1 commit intospring-cloud:mainfrom
omercelikceng:virtualThreadSupport
Open

Replace synchronized blocks with ReentrantLocks for virtual thread support#2656
omercelikceng wants to merge 1 commit intospring-cloud:mainfrom
omercelikceng:virtualThreadSupport

Conversation

@omercelikceng
Copy link

Replace synchronized methods and blocks with ReentrantLocks in a few classes in Spring Cloud Config to improve compatibility with virtual threads. This changes the synchronization mechanism in:

  • AbstractScmEnvironmentRepository
  • JGitEnvironmentRepository
  • SvnKitEnvironmentRepository
  • GenericResourceRepository
  • ResourceController

The change helps avoid blocking virtual threads when using Spring Cloud Config in Project Loom environments while maintaining thread safety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants