use the `execute` methods instead of `asObservable...
# android
a
use the
execute
methods instead of
asObservable
b
Won’t that execute on the main thread? I was taking advantage of Rxjava thread handling so it could perform on IO and i could post results back to main thread
a
then what jake said
j
or
Single.fromCallable(query::execute)
b
Will give it a try. But about point (1), how should one remove the listener if they do want it? I see this causing a leak if the listener stays around
a
when the disposable is disposed it will unregister the listener
j
take(1)
will unsubscribe after the first emission which will cause the listener to be removed
b
Super excited about SQLDelight, we’re working it into the project now and so far it’s awesome. Thanks so much for the help and the sweet library
will do!