ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jdk8/java/util/concurrent/Flow.java
(Generate patch)

Comparing jsr166/src/jdk8/java/util/concurrent/Flow.java (file contents):
Revision 1.1 by jsr166, Sat Mar 26 06:22:50 2016 UTC vs.
Revision 1.2 by jsr166, Sat Mar 11 00:17:04 2017 UTC

# Line 39 | Line 39 | package java.util.concurrent;
39   *   private boolean subscribed; // true after first subscribe
40   *   public synchronized void subscribe(Subscriber<? super Boolean> subscriber) {
41   *     if (subscribed)
42 < *        subscriber.onError(new IllegalStateException()); // only one allowed
42 > *       subscriber.onError(new IllegalStateException()); // only one allowed
43   *     else {
44   *       subscribed = true;
45   *       subscriber.onSubscribe(new OneShotSubscription(subscriber, executor));
# Line 242 | Line 242 | public final class Flow {
242          /**
243           * Adds the given number {@code n} of items to the current
244           * unfulfilled demand for this subscription.  If {@code n} is
245 <         * negative, the Subscriber will receive an {@code onError}
246 <         * signal with an {@link IllegalArgumentException} argument.
247 <         * Otherwise, the Subscriber will receive up to {@code n}
248 <         * additional {@code onNext} invocations (or fewer if
249 <         * terminated).
245 >         * less than or equal to zero, the Subscriber will receive an
246 >         * {@code onError} signal with an {@link
247 >         * IllegalArgumentException} argument.  Otherwise, the
248 >         * Subscriber will receive up to {@code n} additional {@code
249 >         * onNext} invocations (or fewer if terminated).
250           *
251           * @param n the increment of demand; a value of {@code
252           * Long.MAX_VALUE} may be considered as effectively unbounded

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines