dimsuz
03/22/2019, 1:30 PMval completable = Completable.fromAction { /* do stuff */ }.subscribeOn(<http://Schedulers.io|Schedulers.io>())
// later in Applicaton.onCreate()
completable.observeOn(mainThread()).blockingAwait()
This blockingAwait
completely hangs my app, no "stuff" gets done.
If i replace it with subscribe()
, then "stuff" gets done, and everything's working.
Why is that?
How do I block my onCreate() until completable completes?