Coroutines and channels − tutorial

Edit pageLast modified: 16 February 2022

In this tutorial, you'll learn how to use coroutines in IntelliJ IDEA to perform network requests without blocking the underlying thread or callbacks.

You'll learn:

  • Why and how to use suspending functions to perform network requests.

  • How to send requests concurrently using coroutines.

  • How to share information between different coroutines using channels.

For network requests, you'll need the Retrofit library, but the approach shown in this tutorial works similarly for any other libraries that support coroutines.