Skip to content

Commit b95658c

Browse files
committed
Update readme
1 parent 50e25ec commit b95658c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,15 @@ io.reactivex.FlowableOperator fo2 = RxJavaInterop.toV2Operator(rx.Observable.Ope
111111

112112
rx.Observable.Operator fo1 = RxJavaInterop.toV1Operator(io.reactivex.FlowableOperator);
113113
```
114+
115+
### Convert between 1.x `Subscription` and 2.x `Disposable`
116+
117+
```java
118+
// convert from 1.x to 2.x
119+
120+
io.reactivex.disposables.Disposable d2 = RxJavaInterop.toV2Disposable(rx.Subscription);
121+
122+
// convert from 2.x to 1.x
123+
124+
rx.Subscription s1 = RxJavaInterop.toV1Subscription(io.reactivex.disposables.Disposable);
125+
```

0 commit comments

Comments
 (0)