Shashank Kumar

Writer and speaker at

DevFest '18
Sunday, 28-Oct-2018 09:00 AM To 04:30 PM IST

[This is Draft, will be updating...]

What is Async Programming

- Current Solutions (Android)
- Threads (How many is enough?)
-use of callbacks
--callback hell
-- exceptions propagation and handling
- Promise/Futures/Rx Java
- We Transform each function in Object(Promise) which promises result once avail and also provides
chaining to avoid callback hell(#compare function in Thread with RxJava operators)
- Handling Failure?
- so many Operators(even diff for lang)?
- Learning curve and readability
- Kotlin Coroutines
- just add suspend to function
- IDE tells you suspension points
- No need to remember operators
-Loop, try-catch works with suspensions
- everything looks imperative code

-Suspension Functions
-await and sync calls

- Compositions in suspension
can always write higher order functions

- Coroutine builders
- suspension functions can only be called from other suspension functions
- so its a chicken and egg problem, how to initiate coroutines (Coroutine builders)
- launch(fire and forget) - result doesn't matter
- async/await
- runblocking