Useful Links
Computer Science
Programming
By Language
Kotlin Programming
1. Introduction to Kotlin
2. Kotlin Basics and Syntax
3. Functions and Lambdas
4. Object-Oriented Programming in Kotlin
5. Advanced Language Features
6. The Kotlin Standard Library
7. Concurrency with Coroutines
8. Kotlin Multiplatform
9. Practical Kotlin Development
Concurrency with Coroutines
Introduction to Asynchronous Programming
Synchronous vs. Asynchronous Execution
Threading Challenges
Callbacks and Callback Hell
Futures and Promises
Reactive Extensions Overview
Motivation for Coroutines
Core Coroutine Concepts
Suspending Functions (`suspend`)
Coroutine Builders
`launch`
`async`
`runBlocking`
`withContext`
Coroutine Scope
`CoroutineScope`
`GlobalScope`
Custom Scopes
Coroutine Context
Context Elements
Combining Contexts
Structured Concurrency
Parent-Child Relationships
Scope Cancellation
Dispatchers
`Dispatchers.Main`
`Dispatchers.IO`
`Dispatchers.Default`
`Dispatchers.Unconfined`
Custom Dispatchers
Thread Pools
Dispatcher Selection Guidelines
Jobs and Cancellation
The `Job` Interface
Job Lifecycle
Job States
Cooperative Cancellation
Cancellation Exceptions
Non-Cancellable Blocks
Timeouts and Deadlines
`withTimeout`
`withTimeoutOrNull`
Asynchronous Flow
Introduction to `Flow`
Cold vs. Hot Streams
Creating Flows
Flow Builders
`flow`
`flowOf`
`asFlow`
Channel-Based Flows
Terminal Flow Operators
`collect`
`first`
`last`
`single`
`toList`
`toSet`
Intermediate Flow Operators
`map`
`filter`
`onEach`
`take`
`drop`
`transform`
`distinctUntilChanged`
Flow Context and Threading
Buffering and Conflation
`buffer`
`conflate`
`collectLatest`
Flow Completion
`onCompletion`
Completion Exceptions
Exception Handling in Flows
`catch`
Exception Transparency
Channels
Channel Basics
Channel Types
Rendezvous Channel
Buffered Channel
Conflated Channel
Unlimited Channel
Sending and Receiving Data
`send` and `receive`
`trySend` and `tryReceive`
Closing Channels
Channel Iteration
Producer-Consumer Pattern
Exception Handling in Coroutines
Exception Propagation
Supervisor Jobs
`SupervisorJob`
`supervisorScope`
CoroutineExceptionHandler
Exception Handling Strategies
Sharing State and Concurrency Primitives
Thread Safety Issues
Mutex
Semaphore
Atomic Variables
Thread-Safe Collections
Actor Pattern
Testing Coroutines
Test Dispatchers
`runTest`
Testing Flows
Mocking Suspending Functions
Previous
6. The Kotlin Standard Library
Go to top
Next
8. Kotlin Multiplatform