repeatUntil

fun <T> Observable<T>.repeatUntil(predicate: () -> Boolean): Observable<T>

Returns an Observable that calls the predicate when this Observable completes and resubscribes to this Observable if the predicate returned false.

Please refer to the corresponding RxJava document.