JCTools as Shaded Dependency
See original GitHub issueNow that JCTools is available on Maven Central (http://search.maven.org/#search|ga|1|jctools) we should consider depending on it directly instead of copy/pasting as we have done so far: https://github.com/ReactiveX/RxJava/tree/1.x/src/main/java/rx/internal/util/unsafe (note the README that provides background and details).
There are a few considerations:
-
RxJava is a “zero dependency” project so the dependency will need to be shaded (package names changed to be inside RxJava) so that it becomes part of the RxJava jar.
-
Byte size of pulling in code from JCTools that we don’t need. This affects Android particularly.
-
Use of JCTools must all be done behind a conditional check
UnsafeAccess.isUnsafeAvailable()
otherwise RxJava will not work on platforms withoutsun.misc.Unsafe
.
Issue Analytics
- State:
- Created 9 years ago
- Comments:44 (39 by maintainers)
@guidomedina please reflect your intended usecase in a JMH benchmark, let the numbers speak 😉
Closing as this will likely not happen for 1.x. Subsequent versions have to use customized versions anyway.