Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.44 KB

README.md

File metadata and controls

34 lines (28 loc) · 1.44 KB

RxCoroutinesTerminology

Mental Mapping between Rx and Coroutines.

RxJava Coroutines
Single/Completable/Maybe suspend function
Observable/Flowable Flow
Subject/BlockingQueue Channel
PublishSubject SendChannel
BehaviorSubject StateFlow
Schedulers Dispatchers
Disposables Scopes/Job
subscribe collect
Observable.toSingle() Flow.first()
subscribeOn flowOn
observeOn collector’s context
onNext offer/onEach/emit
onError catch
Single<T> suspend () -> T
Maybe<T> suspend () -> T?
Completable suspend () -> unit
Callback* StateFlow
Handler Actor
emit (flow)
  • StateFlow use distinctUntilChangeed by default

  • Coroutines Disparchers = RxJava Scheduler (+ Exception Handler + parent context/job)

Ref: