Skip to content

Instantly share code, notes, and snippets.

@cavarzan
Created April 10, 2016 03:01
Show Gist options
  • Save cavarzan/15fe9b6abcde41cded1a2c1707d2b8d8 to your computer and use it in GitHub Desktop.
Save cavarzan/15fe9b6abcde41cded1a2c1707d2b8d8 to your computer and use it in GitHub Desktop.
Object first = Observable
.create(s -> {
System.out.println("hue");
s.onNext(new Object());
new Handler();
s.onCompleted();
})
.subscribeOn(HandlerScheduler.from(new AsyncHandler("IO_HANDLER")))
.observeOn(AndroidSchedulers.mainThread())
.toBlocking()
.first();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment