简体   繁体   中英

Call a coroutine using RxJava without a scope

I would like to know how I can call a coroutine using RxJava and without using any scope.

If I have

suspend fun fetchInfo()  {
    //some code here
}
  • Does it have to return an Observable??
  • Caller should be able to specify the running thread (ie Schedulers.IO )
  • I might be able to use runBlocking but not sure how to connect everything.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM