Closed
Description
Looks like finallyDo
is behaving wrong:
package rx.lang.groovy.examples
import rx.Observable
class Testing {
static class myActionClass implements rx.util.functions.Action0 {
void call() { println('Finally'); }
}
static main(args) {
def myAction = new myActionClass();
def numbers = Observable.toObservable([1, 2, 3, 4, 5]);
numbers.finallyDo(myAction).subscribe(
[ onNext: { println(it); },
onCompleted:{ println("Sequence complete"); },
onError:{ println("Error encountered"); } ]
);
}
}
Output:
1
2
3
4
5
Sequence complete
Finally
I believe "Finally" should happen before "Sequence Completed"