Skip to content

Commit a2129d7

Browse files
Version 1.0.5
1 parent de259a3 commit a2129d7

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed

CHANGES.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,151 @@
11
# RxJava Releases #
22

3+
### Version 1.0.5 – Feburary 3rd 2015 ([Maven Central](http://search.maven.org/#artifactdetails%7Cio.reactivex%7Crxjava%7C1.0.5%7C)) ###
4+
5+
This release includes many bug fixes along with a few new operators and enhancements.
6+
7+
#### Experimental Operators
8+
9+
This release adds a few experimental operators.
10+
11+
Note that these APIs [may still change or be removed altogether](https://github.com/ReactiveX/RxJava#experimental) since they are marked as `@Experimental`.
12+
13+
##### takeUntil(predicate)
14+
15+
This operator allows conditionally unsubscribing an `Observable` but inclusively emitting the final `onNext`. This differs from `takeWhile` which excludes the final `onNext`.
16+
17+
```java
18+
// takeUntil(predicate) example
19+
Observable.just(1, 2, 3, 4, 5, 6, 7)
20+
.doOnEach(System.out::println)
21+
.takeUntil(i -> i == 3)
22+
.forEach(System.out::println);
23+
24+
// takeWhile(predicate) example
25+
Observable.just(1, 2, 3, 4, 5, 6, 7)
26+
.doOnEach(System.out::println)
27+
.takeWhile(i -> i <= 3)
28+
.forEach(System.out::println);
29+
```
30+
31+
This outputs:
32+
33+
```
34+
// takeUntil(predicate)
35+
[rx.Notification@30e84925 OnNext 1]
36+
1
37+
[rx.Notification@30e84926 OnNext 2]
38+
2
39+
[rx.Notification@30e84927 OnNext 3]
40+
3
41+
42+
// takeWhile(predicate)
43+
[rx.Notification@30e84925 OnNext 1]
44+
1
45+
[rx.Notification@30e84926 OnNext 2]
46+
2
47+
[rx.Notification@30e84927 OnNext 3]
48+
3
49+
[rx.Notification@30e84928 OnNext 4]
50+
```
51+
52+
Note how `takeWhile` produces 4 values and `takeUntil` produces 3.
53+
54+
##### switchIfEmpty
55+
56+
The new `switchIfEmpty` operator is a companion to `defaultIfEmpty` that switches to a different `Observable` if the primary `Observable` is empty.
57+
58+
```java
59+
Observable.empty()
60+
.switchIfEmpty(Observable.just(1, 2, 3))
61+
.forEach(System.out::println);
62+
```
63+
64+
#### Enhancements
65+
66+
##### merge(maxConcurrent) with backpressure
67+
68+
This release adds backpressure to `merge(maxConcurrent)` so that horizontal buffer bloat can also be controll with the `maxConcurrent` parameter.
69+
70+
This allows parallel execution such as the following to work with backpressure:
71+
72+
```java
73+
public class MergeMaxConcurrent {
74+
75+
public static void main(String[] args) {
76+
// define 1,000,000 async tasks
77+
Observable<Observable<Integer>> asyncWork = range(1, 1000000)
78+
.doOnNext(i -> System.out.println("Value: " + i))
79+
.doOnRequest(r -> System.out.println("request1 " + r))
80+
.map(item -> {
81+
return just(item)
82+
// simulate slow IO or computation
83+
.doOnNext(MergeMaxConcurrent::sleep)
84+
.subscribeOn(Schedulers.io());
85+
})
86+
.doOnRequest(r -> System.out.println("request2 " + r));
87+
88+
// allow 10 outstanding tasks at a time
89+
merge(asyncWork, 10).toBlocking().forEach(System.out::println);
90+
}
91+
92+
public static void sleep(int value) {
93+
try {
94+
Thread.sleep(1000);
95+
} catch (InterruptedException e) {
96+
e.printStackTrace();
97+
}
98+
}
99+
}
100+
```
101+
102+
In prior versions all 1,000,000 tasks are immediately emitted and queued for execution. As of this release it correctly allows 10 at a time to be emitted.
103+
104+
#### Changes
105+
106+
107+
* [Pull 2493] (https://github.com/ReactiveX/RxJava/pull/2493) Experimental Operator TakeUntil with predicate
108+
* [Pull 2585] (https://github.com/ReactiveX/RxJava/pull/2585) Experimental Operator: switchIfEmpty
109+
* [Pull 2470] (https://github.com/ReactiveX/RxJava/pull/2470) Experimental Subject state information methods & bounded ReplaySubject termination
110+
* [Pull 2540] (https://github.com/ReactiveX/RxJava/pull/2540) Merge with max concurrency now supports backpressure.
111+
* [Pull 2332] (https://github.com/ReactiveX/RxJava/pull/2332) Operator retry test fix attempt
112+
* [Pull 2244] (https://github.com/ReactiveX/RxJava/pull/2244) OperatorTakeLast add check for isUnsubscribed to fast path
113+
* [Pull 2469] (https://github.com/ReactiveX/RxJava/pull/2469) Remove the execute permission from source files
114+
* [Pull 2455] (https://github.com/ReactiveX/RxJava/pull/2455) Fix for #2191 - OperatorMulticast fails to unsubscribe from source
115+
* [Pull 2474] (https://github.com/ReactiveX/RxJava/pull/2474) MergeTest.testConcurrency timeout to let other tests run
116+
* [Pull 2335] (https://github.com/ReactiveX/RxJava/pull/2335) A set of stateless operators that don't need to be instantiated
117+
* [Pull 2447] (https://github.com/ReactiveX/RxJava/pull/2447) Fail early if a null subscription is added to a CompositeSubscription.
118+
* [Pull 2475] (https://github.com/ReactiveX/RxJava/pull/2475) SynchronousQueue.clone fix
119+
* [Pull 2477] (https://github.com/ReactiveX/RxJava/pull/2477) Backpressure tests fix0121
120+
* [Pull 2476] (https://github.com/ReactiveX/RxJava/pull/2476) Fixed off-by-one error and value-drop in the window operator.
121+
* [Pull 2478] (https://github.com/ReactiveX/RxJava/pull/2478) RefCountAsync: adjusted time values as 1 ms is unreliable
122+
* [Pull 2238] (https://github.com/ReactiveX/RxJava/pull/2238) Fix the bug that cache doesn't unsubscribe the source Observable when the source is terminated
123+
* [Pull 1840] (https://github.com/ReactiveX/RxJava/pull/1840) Unsubscribe when thread is interrupted
124+
* [Pull 2471] (https://github.com/ReactiveX/RxJava/pull/2471) Fixes NPEs reported in ReactiveX#1702 by synchronizing queue.
125+
* [Pull 2482] (https://github.com/ReactiveX/RxJava/pull/2482) Merge: fixed hangs & missed scalar emissions
126+
* [Pull 2547] (https://github.com/ReactiveX/RxJava/pull/2547) Warnings cleanup
127+
* [Pull 2465] (https://github.com/ReactiveX/RxJava/pull/2465) ScheduledExecutorService: call purge periodically on JDK 6 to avoid cancelled task-retention
128+
* [Pull 2591] (https://github.com/ReactiveX/RxJava/pull/2591) Changed the naming of the NewThreadWorker's system parameters
129+
* [Pull 2543] (https://github.com/ReactiveX/RxJava/pull/2543) OperatorMerge handle request overflow
130+
* [Pull 2548] (https://github.com/ReactiveX/RxJava/pull/2548) Subscriber.request should throw exception if negative request made
131+
* [Pull 2550] (https://github.com/ReactiveX/RxJava/pull/2550) Subscriber.onStart requests should be additive (and check for overflow)
132+
* [Pull 2553] (https://github.com/ReactiveX/RxJava/pull/2553) RxRingBuffer with synchronization
133+
* [Pull 2565] (https://github.com/ReactiveX/RxJava/pull/2565) Obstruction detection in tests.
134+
* [Pull 2563] (https://github.com/ReactiveX/RxJava/pull/2563) Retry backpressure test: split error conditions into separate test lines.
135+
* [Pull 2572] (https://github.com/ReactiveX/RxJava/pull/2572) Give more time to certain concurrency tests.
136+
* [Pull 2559] (https://github.com/ReactiveX/RxJava/pull/2559) OnSubscribeFromIterable - add request overflow check
137+
* [Pull 2574] (https://github.com/ReactiveX/RxJava/pull/2574) SizeEviction test needs to return false
138+
* [Pull 2561] (https://github.com/ReactiveX/RxJava/pull/2561) Updating queue code from JCTools
139+
* [Pull 2566] (https://github.com/ReactiveX/RxJava/pull/2566) CombineLatest: fixed concurrent requestUpTo yielding -1 requests
140+
* [Pull 2552] (https://github.com/ReactiveX/RxJava/pull/2552) Publish: fixed incorrect subscriber requested accounting
141+
* [Pull 2583] (https://github.com/ReactiveX/RxJava/pull/2583) Added perf tests for various container-like subscriptions
142+
* [Pull 1955] (https://github.com/ReactiveX/RxJava/pull/1955) OnBackpressureXXX: support for common drain manager & fix for former concurrency bugs
143+
* [Pull 2590] (https://github.com/ReactiveX/RxJava/pull/2590) Zip: fixed unbounded downstream requesting above Long.MAX_VALUE
144+
* [Pull 2589] (https://github.com/ReactiveX/RxJava/pull/2589) Repeat/retry: fixed unbounded downstream requesting above Long.MAX_VALUE
145+
* [Pull 2567] (https://github.com/ReactiveX/RxJava/pull/2567) RefCount: disconnect all if upstream terminates
146+
* [Pull 2593] (https://github.com/ReactiveX/RxJava/pull/2593) Zip: emit onCompleted without waiting for request + avoid re-reading fields
147+
148+
3149
### Version 1.0.4 – December 29th 2014 ([Maven Central](http://search.maven.org/#artifactdetails%7Cio.reactivex%7Crxjava%7C1.0.4%7C)) ###
4150

5151
* [Pull 2156] (https://github.com/ReactiveX/RxJava/pull/2156) Fix the issue that map may swallow fatal exceptions

0 commit comments

Comments
 (0)