Skip to content

Commit 96c3742

Browse files
committed
improve OnSubscribeRefCount comments
1 parent 3e5d8c8 commit 96c3742

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/rx/internal/operators/OnSubscribeRefCount.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public void call(final Subscriber<? super T> subscriber) {
7171
source.connect(onSubscribe(subscriber, writeLocked));
7272
} finally {
7373
// need to cover the case where the source is subscribed to
74-
// outside of this class thus preventing the above Action1
75-
// being called
74+
// outside of this class thus preventing the Action1 passed
75+
// to source.connect above being called
7676
if (writeLocked.get()) {
77-
// Action1 was not called
77+
// Action1 passed to source.connect was not called
7878
lock.unlock();
7979
}
8080
}
@@ -129,6 +129,8 @@ public void onCompleted() {
129129
subscriber.onCompleted();
130130
}
131131
void cleanup() {
132+
// on error or completion we need to unsubscribe the base subscription
133+
// and set the subscriptionCount to 0
132134
lock.lock();
133135
try {
134136
if (baseSubscription == currentBase) {

0 commit comments

Comments
 (0)