This repository was archived by the owner on Mar 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
This repository was archived by the owner on Mar 15, 2022. It is now read-only.
v2.0 Roadmap #16
Copy link
Copy link
Closed
Milestone
Description
This gem has been downloaded several million times and still does the job extremely well. It's been a while since it's been updated, however. Ruby and its ecosystem have evolved a lot since then. A 2.0 release will give us an opportunity to remove some old code, better leverage the JVM when used with JRuby, and possibly add new features. Below is a list of a few suggestions. All feedback is welcome.
- Replace compiled Java with JRuby interop: When running under JRuby the
WeakReferenceandSoftReferenceclasses are just wrappers aroundjava.lang.ref.WeakReferenceandjava.lang.ref.SoftReference(here and here). Rather than using compiled code we could use JRuby's excellent interop (as we frequently do inconcurrent-ruby). - Remove support for IronRuby: IronRuby hasn't been updated in nearly 4 years and appears to no longer be under active development. We can prune some code by removing the IronRuby-specific code and default to the pure-Ruby implementation when running under IronRuby.
- Drop support for Ruby 1.8
- Remove any code that checks for the presence of the
Threadclass: All Ruby interpreters compliant with Ruby 1.9 and above will have threads available. We don't need code branches designed for use when threads are not available. - Use Ruby's
Monitorclass: TheSafeMonitorclass in this gem is not thread-safe on all platforms because it depends on non-atomic operations. TheMonitorclass in Ruby's standard library has improved since 1.8 and should now be sufficient. JRuby implementation ofWeakKeyMap: Use JRuby interop to wrap java.util.WeakHashMap- Ensure thread-safety: This gem was originally designed with thread-safety in mind (see aforementioned
SafeMonitorclass) but concurrency is tricky. To my knowledge there have been no thread-safety issues but a full audit never hurts. The JavaWeakReferenceandSoftReferenceclasses make no thread-safety guarantees (to my knowledge) and some of the classes in this gem perform multiple non-atomic actions in a single method call (see here). We should either ensure that all the classes in the library are thread safe on all platforms, or we should create thread-safe variations. - Convert tests to RSpec: I'll admit it--I'm an RSpec snob. Although this change doesn't really make a difference, it does provide consistency with
concurrent-rubywhich uses RSpec for its tests.
Thoughts? @pitr-ch @mighe @chrisseaton @obrok @lucasallan
Metadata
Metadata
Assignees
Labels
No labels