This session was given at Paris Android Makers 2020 by Fabio Collini, The New York Times.
More info: https://android-makers-2020.firebasea...
Using Kotlin coroutines it’s really easy to execute a task in a background thread and update the UI based on the result. Just enter the coroutine world using the launch method and then change thread using withContext. It’s even simpler if the task is an http call (thanks to coroutines support in retrofit) or a database query (thanks to Room). The final code is the same we’d use to execute synchronous code.
But coroutines are more than just a tool to switch thread, we can use them to execute tasks in parallel. The code is still really easy to read but sometimes it can be difficult to write: we need to pay attention to many aspects (like nested scopes, exceptions and dispatchers). In this talk we’ll see how to leverage the coroutines library to manage parallelism, from the basic concepts to some advanced example.
Watch video Managing parallelism using coroutines by Fabio Collini, The New York Times EN online without registration, duration hours minute second in high quality. This video was added by user Android Makers 17 June 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 411 once and liked it 7 people.