~/talk

Coroutining Android apps

Talkat Mobius 2019 Piter · 2019-05-22..05-23· [android, concurrency]
slides:none on file

Practical recipes for Kotlin coroutines: scope must be tied to lifecycle (use SupervisorJob in a CoroutineScope) or async work gets cancelled mid-send and messages get lost — replacing the Job in a new scope fixes that bug; avoid globalScope and create a new scope instead. Use withContext/dispatcher defaults inside suspend functions so callers don’t duplicate context. Inject a dispatcher provider for tests to run synchronously. Built a Retrofit adapter and tiny Rx-operator library and they work; Flow is cold (preview) and replaces many Rx use cases.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 4:25Coroutines vs callbacks and RxJava
  3. 7:39Structured concurrency basics
  4. 10:49Lifecycle-aware coroutines
  5. 14:00Choosing correct coroutine scope
  6. 17:56Global scope pitfalls
  7. 18:39Dispatcher selection best practices
  8. 20:07withContext function usage
  9. 22:57Main dispatcher behavior
  10. 25:02Self-contained suspend functions
  11. 27:15Retrofit and Room suspend support
  12. 30:06Testing with custom dispatchers
  13. 32:57Debugging coroutines
  14. 35:47Exception handling in coroutines
  15. 37:53Migrating from Java to Kotlin coroutines
  16. 39:21RxJava operators replacement
  17. 40:44Flow vs RxJava streams
  18. 43:15Coroutines limitations and future
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.