src/main/java/io/reactivex/Single.java
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> doAfterTerminate(Action onAfterTerminate) {
        ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null");
        return RxJavaPlugins.onAssembly(new SingleDoAfterTerminate<T>(this, onAfterTerminate));
    }
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> doAfterTerminate(Action onAfterTerminate) {
        ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null");
        return RxJavaPlugins.onAssembly(new SingleDoAfterTerminate<T>(this, onAfterTerminate));
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > doAfterTerminate ( Action onAfterTerminate ) { ObjectHelper . requireNonNull ( onAfterTerminate , "onAfterTerminate is null" ) ; return RxJavaPlugins . onAssembly ( new SingleDoAfterTerminate < T > ( this , onAfterTerminate ) ) ; }
Registers an {@link Action} to be called after this Single invokes either onSuccess or onError.
<p>
<img width="640" height="460" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.doAfterTerminate.png" alt="">
<p>
Note that the {@code doAfterTerminate} action is shared between subscriptions and as such
should be thread-safe.</p>

<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code doAfterTerminate} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

<p>History: 2.0.6 - experimental
@param onAfterTerminate
an {@link Action} to be invoked when the source Single finishes
@return a Single that emits the same items as the source Single, then invokes the
{@link Action}
@see <a href="http://reactivex.io/documentation/operators/do.html">ReactiveX operators documentation: Do</a>
@since 2.1
Registers an { @link Action } to be called after this Single invokes either onSuccess or onError . <p > <img width = 640 height = 460 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / Single . doAfterTerminate . png alt = > <p > Note that the { @code doAfterTerminate } action is shared between subscriptions and as such should be thread - safe . < / p >