Skip to content

Instantly share code, notes, and snippets.

@inyl
Created October 14, 2016 06:05
Show Gist options
  • Save inyl/f313297e6f435d370cc8afd76f722584 to your computer and use it in GitHub Desktop.
Save inyl/f313297e6f435d370cc8afd76f722584 to your computer and use it in GitHub Desktop.
RxJava await example
Completable som1 = Completable.fromAction(() -> System.out.println("Hello World")).subscribeOn(Schedulers.io());
Completable som2 = Completable.fromAction(() -> System.out.println("Foo bar")).subscribeOn(Schedulers.io());
Completable.merge(som1, som2).await();
System.out.println("await done");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment