Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove threadsafe gem dependency #45
This PR includes the whitespace PR I just sent. If you merge that PR, you should just see the relevant changes here.
This change removes the thread_safe gem dependency and instead uses a Mutex as a write barrier to ensure multiple threads can't write to the Hash at the same time.
Thanks for submitting the PRs. I hadn't spotted that the thread_safe gem is being deprecated.
Is synchronizing just
I'm happy with switching from thread_safe to concurrent-ruby.
tzinfo currently has a
@matthewd is right, technically it is not enough to have synchronization just on the write side. I will readily admit that right now, on all the current Ruby VMs, when run on x86 hardware, synchronization on the read side is not required, but I'm pretty sure that this is going to change on the new gen of runtimes (namely truffle+jruby).
@philr if swapping
PS: @matthewd, thx for the ping.
referenced this pull request
Feb 4, 2016
@thedarkone thanks for the confirmation regarding write-only synchronization.
The larger code base of concurrent-ruby is unlikely to be an issue. I think the majority of TZInfo users are using it through ActiveSupport and ActiveSupport has already switched to concurrent-ruby for the upcoming Rails 5 release.
I've raised #46 for switching to