Closed bjfish closed 3 years ago
Thank you for the issue report. I can report that I can reproduce the issue with the steps you've provided.
Replacing the {}
with Concurrent::Hash.new
would be part of the solution, I think. The issue then is what to do as a substitute for deep_merge!
, which is not a method on Concurrent::Hash
objects.
Ok, looks like deep_merge!
will work. The tests seem happy with that commit.
Does that work for your case too, @bjfish?
@radar Yes, this fixes the issue, thanks.
@bjfish Great. I'll do a 1.8.8 release shortly with this commit included.
All done. Thank you @bjfish.
What I tried to do
I tried to run rails tests in parallel using threads and got test failures similar to the following example. https://github.com/rails/rails/blob/291a3d2ef29a3842d1156ada7526f4ee60dd2b59/activesupport/lib/active_support/test_case.rb#L83
Example Code
What I expected to happen
prints:
Done
What actually happened
Comments
Potentially unsafe code here: https://github.com/ruby-i18n/i18n/blob/v1.8.7/lib/i18n/backend/simple.rb#L43-L45
Maybe this should be a
Concurrent::Hash
?