~/talk

Concurrency doesn,t have to be hard: Kotlin Coroutines and Channels

Talkat Android Makers 2019 · on Wednesday, 2019-04-24· [kotlin, reactive-programming]
name:Jag Saund
github:jsaund
slides:none on file

A concrete walkthrough shows Kotlin coroutines and channels replacing Thread.sleep and messy callbacks with suspend/delay, runBlocking, actors, produce, select and flows; a coffee‑shop system is built (cashier → channel → two baristas → shared espresso machine implemented with actors and completableDeferred) and measured: sequential version takes 12 seconds to 6 seconds with two baristas then ~5 seconds after async parallelism; use of completableDeferred and select solves routing, and closing the channel stops the deadlock.

AI-written summary · about

  1. 0:00Start
  2. 1:06Futures
  3. 8:59Run Blocking
  4. 11:29Root Cause of the Problem
  5. 13:18Quarantine Scope
  6. 14:52How Channels Work
  7. 15:44Buffered Channel
  8. 16:14Conflated Channel
  9. 17:03Create an Orders Channel
  10. 22:19Recap
  11. 23:03New Espresso Machine Object
  12. 25:15Actor Quarantine Builder
  13. 26:27Select Keyword
  14. 27:11Select Statement
  15. 29:54Class Delegation
  16. 31:28Async Operator
  17. 32:46Flow
  18. 33:30Leverage Flows
  19. 34:56Flow Builder
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.