Skip to content

Finally Happens after onCompleted #277

Closed
@benjchristensen

Description

@benjchristensen

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions