Skip to content

Commit a736ec1

Browse files
committed
Added doAfterTerminate. Deprecated finallyDo.
Since RxJava 1.1.1 finallyDo is deprecated. Added doAfterTerminate marble
1 parent b931e27 commit a736ec1

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

documentation/operators.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ operators.
531531
* [`distinctUntilKeyChanged`]({{ site.url }}/documentation/operators/distinct.html)
532532
* [**`Do`**]({{ site.url }}/documentation/operators/do.html)
533533
* [`doAction`]({{ site.url }}/documentation/operators/do.html)
534+
* [`doAfterTerminate`]({{ site.url }}/documentation/operators/do.html)
534535
* [`doOnCompleted`]({{ site.url }}/documentation/operators/do.html)
535536
* [`doOnEach`]({{ site.url }}/documentation/operators/do.html)
536537
* [`doOnError`]({{ site.url }}/documentation/operators/do.html)

documentation/operators/do.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ <h4>Sample Code</h4>
165165
</figure>
166166
{% endlang_operator %}
167167

168-
{% lang_operator RxJava doOnCompleted doOnEach doOnError doOnNext doOnRequest doOnSubscribe doOnTerminate doOnUnsubscribe finallyDo %}
168+
{% lang_operator RxJava doOnCompleted doOnEach doOnError doOnNext doOnRequest doOnSubscribe doOnTerminate doOnUnsubscribe finallyDo doAfterTerminate %}
169169
<p>
170170
RxJava has several <span class="operator">Do</span> variants.
171171
</p>
@@ -287,13 +287,26 @@ <h4>Sample Code</h4>
287287
<figure class="variant">
288288
<img src="images/finallyDo.png" style="width:100%;" alt="finallyDo" />
289289
<figcaption><p>
290+
<code>finallyDo</code></a> is deprecated since RxJava 1.1.1, in favor of
291+
<code>doAfterTerminate</code> with the same behavior.
292+
</p><p>
290293
The <code>finallyDo</code> operator registers an <code>Action</code> which will be called just
291294
<em>after</em> the resulting Observable terminates, whether normally or with an error.
292295
</p>
293296
<ul>
294297
<li>Javadoc: <a href="http://reactivex.io/RxJava/javadoc/rx/Observable.html#finallyDo(rx.functions.Action0)"><code>finallyDo(Action0)</code></a></li>
295298
</ul></figcaption>
296299
</figure>
300+
<figure class="variant">
301+
<img src="images/doAfterTerminate.png" style="width:100%;" alt="doAfterTerminate" />
302+
<figcaption><p>
303+
The <code>doAfterTerminate</code> operator registers an <code>Action</code> which will be called just
304+
<em>after</em> the resulting Observable terminates, whether normally or with an error.
305+
</p>
306+
<ul>
307+
<li>Javadoc: <a href="http://reactivex.io/RxJava/javadoc/rx/Observable.html#doAfterTerminate(rx.functions.Action0)"><code>doAfterTerminate(Action0)</code></a></li>
308+
</ul></figcaption>
309+
</figure>
297310
{% endlang_operator %}
298311

299312
{% lang_operator RxJS do doOnCompleted doOnError doOnNext finally tap tapOnCompleted tapOnError tapOnNext %}
Loading

0 commit comments

Comments
 (0)