Skip to content

Commit

Permalink
chore: fix some typos in comments (#7689)
Browse files Browse the repository at this point in the history
Signed-off-by: laterlaugh <manziwenzhai@sina.cn>
  • Loading branch information
laterlaugh committed Apr 12, 2024
1 parent 41011b4 commit b8f61d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/Phantom-Operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ streamOfItems.flatMap(item -> {
itemToObservable(item).subscribeOn(Schedulers.io());
});
```
Kick off your work for each item inside [`flatMap`](Transforming-Observables#flatmap-concatmap-and-flatmapiterable) using [`subscribeOn`](Observable-Utility-Operators#subscribeon) to make it asynchronous, or by using a function that already makes asychronous calls.
Kick off your work for each item inside [`flatMap`](Transforming-Observables#flatmap-concatmap-and-flatmapiterable) using [`subscribeOn`](Observable-Utility-Operators#subscribeon) to make it asynchronous, or by using a function that already makes asynchronous calls.

#### see also:
* <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a> by Graham Lea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void tryRemoveIfNotIn() {
cd.remove(cd1);
cd.add(cd2);

cd.remove(cd1); // try removing agian
cd.remove(cd1); // try removing again
}

@Test(expected = NullPointerException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package io.reactivex.rxjava3.exceptions;

/**
* Exception for testing if unchecked expections propagate as-is without confusing with
* Exception for testing if unchecked exceptions propagate as-is without confusing with
* other type of common exceptions.
*/
public final class TestException extends RuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void mergeSync() {
assertEquals(num, ts.values().size());
// either one can starve the other, but neither should be capable of doing more than 5 batches (taking 4.1)
// TODO is it possible to make this deterministic rather than one possibly starving the other?
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algoritms generally take a performance hit
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algorithms generally take a performance hit
assertTrue(c1.get() < Flowable.bufferSize() * 5);
assertTrue(c2.get() < Flowable.bufferSize() * 5);
}
Expand All @@ -154,7 +154,7 @@ public void mergeAsync() {
assertEquals(num, ts.values().size());
// either one can starve the other, but neither should be capable of doing more than 5 batches (taking 4.1)
// TODO is it possible to make this deterministic rather than one possibly starving the other?
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algoritms generally take a performance hit
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algorithms generally take a performance hit
int max = Flowable.bufferSize() * 7;
assertTrue("" + c1.get() + " >= " + max, c1.get() < max);
assertTrue("" + c2.get() + " >= " + max, c2.get() < max);
Expand Down Expand Up @@ -206,7 +206,7 @@ public void mergeAsyncThenObserveOn() {
assertEquals(num, ts.values().size());
// either one can starve the other, but neither should be capable of doing more than 5 batches (taking 4.1)
// TODO is it possible to make this deterministic rather than one possibly starving the other?
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algoritms generally take a performance hit
// benjchristensen => In general I'd say it's not worth trying to make it so, as "fair" algorithms generally take a performance hit
// akarnokd => run this in a loop over 10k times and never saw values get as high as 7*SIZE, but since observeOn delays the unsubscription non-deterministically, the test will remain unreliable
assertTrue(c1.get() < Flowable.bufferSize() * 7);
assertTrue(c2.get() < Flowable.bufferSize() * 7);
Expand Down

0 comments on commit b8f61d3

Please sign in to comment.