diff --git a/src/main/java/rx/subscriptions/CompositeSubscription.java b/src/main/java/rx/subscriptions/CompositeSubscription.java index d275d7ebfb..f4941875f5 100644 --- a/src/main/java/rx/subscriptions/CompositeSubscription.java +++ b/src/main/java/rx/subscriptions/CompositeSubscription.java @@ -27,6 +27,8 @@ /** * Subscription that represents a group of Subscriptions that are unsubscribed together. + *

+ * All methods of this class are thread-safe. */ public final class CompositeSubscription implements Subscription { @@ -98,8 +100,8 @@ public void remove(final Subscription s) { /** * Unsubscribes any subscriptions that are currently part of this {@code CompositeSubscription} and remove - * them from the {@code CompositeSubscription} so that the {@code CompositeSubscription} is empty and in - * an unoperative state. + * them from the {@code CompositeSubscription} so that the {@code CompositeSubscription} is empty and + * able to manage new subscriptions. */ public void clear() { if (!unsubscribed) { @@ -116,6 +118,11 @@ public void clear() { } } + /** + * Unsubscribes itself and all inner subscriptions. + *

After call of this method, new {@code Subscription}s added to {@link CompositeSubscription} + * will be unsubscribed immediately. + */ @Override public void unsubscribe() { if (!unsubscribed) {