-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Gson taking a lock on SimpleDateFormat #1726
Comments
|
We are having the same problem, especcially with heavy load. It simply blocked with a while loop and a concurrent unit test so this surely deserves some attention. We implemented a custom DateTypeAdapter using FastDateFormat and the troubles went away. |
The underlying issue is that Gson currently uses However, in general it would be good if you registered a custom |
meet this error |
While debugging a problem in our service, I noticed that
Gson
is usingSimpleDateFormat
. While doing that, it is taking a lock that causes other threads using that same instance of Gson to block...41 threads waiting on that lock....
This is with gson-2.8.0
The text was updated successfully, but these errors were encountered: