Skip to content

Instantly share code, notes, and snippets.

@oehme
Last active August 29, 2015 14:04
Show Gist options
  • Save oehme/6362cf85d3fa82b3ee7e to your computer and use it in GitHub Desktop.
Save oehme/6362cf85d3fa82b3ee7e to your computer and use it in GitHub Desktop.
Resolving ambigous situations
//Preferred OnSubscribe API
Observable.create[
onNext(9000)
onCompleted
]
.subscribe[
println(it)
]
//force the deprecated OnSubscribeFunc API by returning a Subscription
Observable.create[
onNext(9000)
onCompleted
return Subscriptions.empty
]
.subscribe[
println(it)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment