Skip to content

Commit 54850d0

Browse files
authored
3.x: Fix take() mentioning the old limit() operator (#7145)
1 parent a55f43e commit 54850d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/io/reactivex/rxjava3/core/Flowable.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16436,8 +16436,8 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
1643616436
}
1643716437

1643816438
/**
16439-
* Returns a {@code Flowable} that emits only the first {@code count} items emitted by the current {@code Flowable}. If the source emits fewer than
16440-
* {@code count} items then all of its items are emitted.
16439+
* Returns a {@code Flowable} that emits only the first {@code count} items emitted by the current {@code Flowable}.
16440+
* If the source emits fewer than {@code count} items then all of its items are emitted.
1644116441
* <p>
1644216442
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/take.v3.png" alt="">
1644316443
* <p>
@@ -16450,15 +16450,15 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
1645016450
* possibly prevent the creation of excess items by the upstream.
1645116451
* <p>
1645216452
* The operator requests at most the given {@code count} of items from upstream even
16453-
* if the downstream requests more than that. For example, given a {@code limit(5)},
16453+
* if the downstream requests more than that. For example, given a {@code take(5)},
1645416454
* if the downstream requests 1, a request of 1 is submitted to the upstream
1645516455
* and the operator remembers that only 4 items can be requested now on. A request
1645616456
* of 5 at this point will request 4 from the upstream and any subsequent requests will
1645716457
* be ignored.
1645816458
* <p>
16459-
* Note that requests are negotiated on an operator boundary and {@code limit}'s amount
16459+
* Note that requests are negotiated on an operator boundary and {@code take}'s amount
1646016460
* may not be preserved further upstream. For example,
16461-
* {@code source.observeOn(Schedulers.computation()).limit(5)} will still request the
16461+
* {@code source.observeOn(Schedulers.computation()).take(5)} will still request the
1646216462
* default (128) elements from the given {@code source}.
1646316463
* <dl>
1646416464
* <dt><b>Backpressure:</b></dt>

0 commit comments

Comments
 (0)