Managing parallelism using coroutines by Fabio Collini, The New York Times EN

Опубликовано: 17 Июнь 2020
на канале: Android Makers
411
7

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.


Смотрите видео Managing parallelism using coroutines by Fabio Collini, The New York Times EN онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Android Makers 17 Июнь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 411 раз и оно понравилось 7 людям.