【文件属性】:
文件名称:RxCoroutineSchedulers:Kotlin Coroutines作为RxJava Scheduler:smiling_face_with_horns:
文件大小:12KB
文件格式:ZIP
更新时间:2021-03-09 19:00:04
kotlin rxjava coroutines schedulers Kotlin
Rx协程计划程序
Kotlin协程作为RxJava调度程序 :smiling_face_with_horns:
主要思想来自 :light_bulb:
例子
在目标使用扩展功能asScheduler() :smiling_face_with_sunglasses:
val disposable = Observable
.create( .. .)
.subscribeOn( Dispatchers . IO .asScheduler())
.observeOn( Dispatchers . Main .asScheduler())
.subscribe( .. .)
您还可以指定一个 ,所有协程作业将在其中运行并被其取消 :nail_polish:
val disposable = Observable
.create( .. .)
.subscribeOn( Dispatchers . IO .asScheduler(yourScope))
.observeOn( Dispatchers . Ma
【文件预览】:
RxCoroutineSchedulers-master
----pom.xml(4KB)
----LICENSE(11KB)
----src()
--------main()
----.gitignore(320B)
----README.md(2KB)