|
| 1 | +# rxjava-quasar |
| 2 | + |
| 3 | +Integrates RxJava with [Quasar](https://github.com/puniverse/quasar). |
| 4 | +Includes a fiber (lightweight-thread) based scheduler, and an Observable API for Quasar channels. |
| 5 | + |
| 6 | +Main Classes: |
| 7 | + |
| 8 | +- [NewFiberScheduler](https://github.com/Netflix/RxJava/blob/master/rxjava-contrib/rxjava-quasar/src/main/java/rx/quasar/NewFiberScheduler.java) |
| 9 | +- [ChannelObservable](https://github.com/Netflix/RxJava/blob/master/rxjava-contrib/rxjava-quasar/src/main/java/rx/quasar/ChannelObservable.java) |
| 10 | +- [BlockingObservable](https://github.com/Netflix/RxJava/blob/master/rxjava-contrib/rxjava-quasar/src/main/java/rx/quasar/BlockingObservable.java) |
| 11 | + |
| 12 | + |
| 13 | +# Binaries |
| 14 | + |
| 15 | +Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Ccom.netflix.rxjava). |
| 16 | + |
| 17 | +Example for [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22rxjava-apache-http%22): |
| 18 | + |
| 19 | +```xml |
| 20 | +<dependency> |
| 21 | + <groupId>com.netflix.rxjava</groupId> |
| 22 | + <artifactId>rxjava-quasar</artifactId> |
| 23 | + <version>x.y.z</version> |
| 24 | +</dependency> |
| 25 | +``` |
| 26 | + |
| 27 | +and for Ivy: |
| 28 | + |
| 29 | +```xml |
| 30 | +<dependency org="com.netflix.rxjava" name="rxjava-quasar" rev="x.y.z" /> |
| 31 | +``` |
| 32 | + |
| 33 | +# Usage |
| 34 | + |
| 35 | +As always when using Quasar, the java agent has to be started by adding the following JVM option: |
| 36 | + |
| 37 | +``` |
| 38 | +-javaagent:path-to-quasar-jar.jar |
| 39 | +``` |
| 40 | + |
| 41 | +Alternatively, you can use AOT instrumentation (see [the Quasar documentation](http://docs.paralleluniverse.co/quasar/#instrumentation)). |
| 42 | + |
| 43 | +Or, if you're running in Tomcat, you can use the Quasar class loader (see [the Comsat documentation](http://docs.paralleluniverse.co/comsat/#enabling-comsat)). |
| 44 | + |
| 45 | +`Observer`, `Function` or `Action` method implementations can call fiber-blocking operations when using the `NewFiberScheduler` if the method is annotated with `@Suspendable`. |
| 46 | +(rx-core `Observer`s, `Function`s or `Action`s that manipulate, transform or delegate to other `Observer`s, `Function`s or `Action`s are automatically instrumented). |
| 47 | + |
0 commit comments