Sling Academy
Home/Kotlin/Kotlin - Coroutines and Asynchronous Programming

Kotlin - Coroutines and Asynchronous Programming

This series of tutorials is about coroutines and asynchronous programming in Kotlin:

  • Basics of Coroutines
  • Structured Concurrency
  • Working with Async Tasks
    • Using launch, async, and await.

1 Introduction to Coroutines in Kotlin

2 Understanding the Basics of Coroutines in Kotlin

3 Why Use Coroutines for Asynchronous Programming in Kotlin?

4 Setting Up Coroutines in a Kotlin Project

5 How to Launch Your First Coroutine in Kotlin

6 Using `launch` for Concurrent Execution in Kotlin

7 Understanding `async` and `await` in Kotlin Coroutines

8 Difference Between `launch` and `async` in Kotlin

9 How to Handle Asynchronous Tasks with Coroutines in Kotlin

10 Using Coroutine Builders: `launch`, `async`, and `runBlocking` in Kotlin

11 Exploring Structured Concurrency in Kotlin

12 Managing Coroutine Scopes in Kotlin

13 How to Cancel Coroutines Gracefully in Kotlin

14 Using `withContext` to Switch Coroutine Contexts in Kotlin

15 How to Use Dispatchers in Kotlin Coroutines (`IO`, `Default`, `Main`)

16 Handling Errors in Kotlin Coroutines with Exception Handling

17 Using `try-catch` in Kotlin Coroutines for Safe Execution

18 How to Timeout Coroutines in Kotlin with `withTimeout`

19 Combining Coroutines and Suspend Functions in Kotlin

20 Understanding `suspend` Functions in Kotlin

21 How to Create Custom `suspend` Functions in Kotlin

22 Using Coroutines for Network Calls in Kotlin

23 How to Perform File I/O Operations with Coroutines in Kotlin

24 Using Coroutines with Room Database in Kotlin

25 How to Use Kotlin Coroutines with Retrofit for Networking

26 Handling Parallel Tasks in Kotlin Coroutines

27 Using `join` and `cancelAndJoin` in Kotlin Coroutines

28 Exploring Coroutine Context and Job in Kotlin

29 How to Use CoroutineScope in Kotlin for Cleaner Code

30 Introduction to Coroutine Flow in Kotlin

31 Using `flow` for Reactive Programming in Kotlin

32 How to Collect Data from a Flow in Kotlin Coroutines

33 Combining Flows with Operators in Kotlin Coroutines

34 Using SharedFlow and StateFlow in Kotlin Coroutines

35 Working with Channels for Communication in Kotlin Coroutines

36 Using `produce` and `actor` in Kotlin Channels

37 Understanding Cold and Hot Streams in Kotlin Coroutines

38 How to Debug Kotlin Coroutines with Logging

39 Best Practices for Using Kotlin Coroutines in Projects

40 Real-World Examples of Asynchronous Programming with Kotlin Coroutines