Kotlin Coroutines Under the Hood: A Senior Engineer's Playbook for Structured Concurrency, Flow, Dispatchers, Compiler Internals, and Concurrency at Scale on JVM Android

Prijzen vanaf
32,31

Gesponsorde links

VERGELIJK ALLE AANBIEDERS (3)

Beschrijving

Bol Most coroutines content teaches you the keywords. This book teaches you the machine.launch, async, suspend, a Flow collected in a LaunchedEffect - you've used them. But do you know why a senior engineer reaches for StandardTestDispatcher instead of runBlocking, wires a SupervisorJob instead of a plain Job, or spots an unawaited async under a supervisor scope as a silent landmine on sight?Kotlin Coroutines Under the Hood closes the gap between using the coroutines API and understanding what it's built on. It goes past syntax-level tutorials and down to the bytecode: the Continuation-Passing Style transform the Kotlin compiler performs on every suspend function, the generated state machine that lets local variables survive a suspension point, and exactly why a suspended coroutine costs a few dozen bytes on the heap while a blocked thread costs a megabyte of reserved stack.From there, it builds back up through the full structured-concurrency model - CoroutineContext, Job hierarchies, cancellation propagation, exception aggregation - into Flow, StateFlow, SharedFlow, channels, mutexes, and the bridging APIs (callbackFlow, suspendCancellableCoroutine) that connect coroutines to callback-based and Java code.What's inside: - A 100,000-coroutines-vs-100,000-threads benchmark lab, built and measured from scratch- A from-scratch dissection of a compiler-generated state machine- Dispatcher internals: thread pool growth, work-stealing schedulers, and why Unconfined is a production hazard- Structured concurrency and cancellation: coroutineScope, supervisorScope, cooperative cancellation, and the cancellation bugs that pass code review anyway- Exception propagation rules by builder, and why exceptions in async stay silent until await()- Flow, StateFlow, SharedFlow, channels, and mutexes, covered as a system rather than a grab-bag of APIs- A complete Android case study retrofitting a legacy callback-driven app onto coroutines and Flow- A closing section of best practices, common mistakes, and interview preparationStructured as a 25-chapter roadmap - foundations, coroutine context and structured concurrency, Flow, channels and low-level primitives, JVM mechanics and performance, an Android case study, and best practices - every mechanism is paired with a fully worked, runnable example, not an abstract snippet.This book is for you if: You're a Kotlin engineer who already ships coroutine-based code and wants to reason about it with the same precision as the compiler - not someone looking for a crash course to stop crashes.

Vergelijk aanbieders (3)

Gesponsorde links · Sommige shops betalen ons een vergoeding

Sorteren op:

€ 32,31 Gratis verzending

€ 32,31 Gratis verzending

€ 33,14 Gratis verzending

Beschrijving (1)

Most coroutines content teaches you the keywords. This book teaches you the machine.launch, async, suspend, a Flow collected in a LaunchedEffect - you've used them. But do you know why a senior engineer reaches for StandardTestDispatcher instead of runBlocking, wires a SupervisorJob instead of a plain Job, or spots an unawaited async under a supervisor scope as a silent landmine on sight?Kotlin Coroutines Under the Hood closes the gap between using the coroutines API and understanding what it's built on. It goes past syntax-level tutorials and down to the bytecode: the Continuation-Passing Style transform the Kotlin compiler performs on every suspend function, the generated state machine that lets local variables survive a suspension point, and exactly why a suspended coroutine costs a few dozen bytes on the heap while a blocked thread costs a megabyte of reserved stack.From there, it builds back up through the full structured-concurrency model - CoroutineContext, Job hierarchies, cancellation propagation, exception aggregation - into Flow, StateFlow, SharedFlow, channels, mutexes, and the bridging APIs (callbackFlow, suspendCancellableCoroutine) that connect coroutines to callback-based and Java code.What's inside: - A 100,000-coroutines-vs-100,000-threads benchmark lab, built and measured from scratch- A from-scratch dissection of a compiler-generated state machine- Dispatcher internals: thread pool growth, work-stealing schedulers, and why Unconfined is a production hazard- Structured concurrency and cancellation: coroutineScope, supervisorScope, cooperative cancellation, and the cancellation bugs that pass code review anyway- Exception propagation rules by builder, and why exceptions in async stay silent until await()- Flow, StateFlow, SharedFlow, channels, and mutexes, covered as a system rather than a grab-bag of APIs- A complete Android case study retrofitting a legacy callback-driven app onto coroutines and Flow- A closing section of best practices, common mistakes, and interview preparationStructured as a 25-chapter roadmap - foundations, coroutine context and structured concurrency, Flow, channels and low-level primitives, JVM mechanics and performance, an Android case study, and best practices - every mechanism is paired with a fully worked, runnable example, not an abstract snippet.This book is for you if: You're a Kotlin engineer who already ships coroutine-based code and wants to reason about it with the same precision as the compiler - not someone looking for a crash course to stop crashes.


Productspecificaties

Merk Independently Published
EAN
  • 9798171395490
Maat


Prijshistorie

* Prijshistorie bevat geen data van Amazon, Amazon Marketplace.

Prijzen voor het laatst bijgewerkt op:

Uitgelichte Keuze
32,31
Naar shop