We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code like this:
@cache[key] || @mutex.synchronize { @cache[key] ||= fetch_value }
Is not thread-safe and is flaky (fails CI sometimes) on Rubinius.
Instances of this in the codebase are:
i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_reader.rb
Line 25 in 3582b9a
i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_finder_provider.rb
Lines 22 to 25 in 3582b9a
This one should be OK, as the instance variable is set (to nil) in the constructor (so the ivars keys are not modified):
nil
i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_finder.rb
Line 31 in 3582b9a
The text was updated successfully, but these errors were encountered:
1bdae5f
concurrent/cached_value: Avoid computing twice
d81b34e
Also, clear `@computation` after we obtained the value, as we no longer need it. Refs #300
d9244f7
concurrent/cached_value: Volatile result access
a2bdd8d
Refs #300
4fbf49c
No branches or pull requests
Code like this:
Is not thread-safe and is flaky (fails CI sometimes) on Rubinius.
Instances of this in the codebase are:
i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_reader.rb
Line 25 in 3582b9a
i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_finder_provider.rb
Lines 22 to 25 in 3582b9a
This one should be OK, as the instance variable is set (to
nil
) in the constructor (so the ivars keys are not modified):i18n-tasks/lib/i18n/tasks/scanners/files/caching_file_finder.rb
Line 31 in 3582b9a
The text was updated successfully, but these errors were encountered: