Random things - good practice Flashcards

1
Q

What should we do every time we use RxJava creator - .create?

A

We should check if it is not disposed already.

Single.create { emitter ->
  if(!emitter.isDisposed) {
    emitter.onSuccess(...)
    emitter.onError(...)
  }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly