About This Title

Pages: 250
Published: March 2026
ISBN: 9798888651551
In Beta

Skill Level Meter

Kotlin Coroutine Confidence

Untangle Your Async, Ship Safety at Speed

by Sam Cooper

Get the efficiency of asynchronous processing without the compromises. Break free from the outdated trade-offs of callbacks and futures, and enjoy the best of both worlds when you mix suspending functions right into familiar loops and sequential programs. Identify opportunities, anticipate hazards, and master key functions and concepts through real coding projects that put coroutines in context. Unleash the real potential of your code and your hardware by dividing problems into structured tasks that run concurrently. Then sit back and enjoy the confidence that comes from using tried and tested tools and idioms to ship maintainable, fault-tolerant code.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $30.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Mar 2026

Beta Books: What do I get?


Your code can’t afford to waste resources or block important threads. Whether you’re juggling dozens of inputs and outputs, keeping user interfaces smooth and snappy, or parallelizing heavy workloads, you need a dependable way to write asynchronous code that’s responsive, readable, and reliable. Coroutines combine the benefits of asynchronous execution with the straightforward sequential style of familiar blocking functions, so you can write your code the way you want and let Kotlin take care of running it efficiently.

Build a mental toolkit of coroutine idioms. Following step-by-step examples and real-world explanations, you’ll speed up your code and improve user experiences. Use structured tasks to safely manage errors and resources. Unlock new suspending functions and old control flow possibilities, all while integrating seamlessly with the tools and libraries you already know. Match coroutine tools instinctively to common tasks, and collaborate with confidence when you follow suspending function conventions.

Peek below the surface and see how coroutines keep you safe behind the scenes. Diagnose problems before they happen, and rely on the Three Rules of Jobs to sidestep concurrency pitfalls. Debug and test asynchronous operations, and ship coroutines that make life easy for you, your coworkers, and your users.

What You Need

You’ll need a computer running version 8 or higher of the Java Development Kit, as well as an IDE like IntelliJ IDEA community edition or Android Studio. You’ll need to be comfortable creating a new project in your IDE and adding dependencies to it.

Resources

Releases:

  • B1.0 2025/03/18

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

Introduction

  • Best of Both Worlds
    • Wait Without Worrying
      • What is a Coroutine?
      • Suspend Your First Function
      • Keep the Main Thread Clear
      • What Have We Learned?
    • Escape From Callback Hell
      • Plot Your Program’s Path
      • Reclaim Control Flow Keywords
      • Excavate the Indentation Pyramid
      • What Have We Learned?
    • Start It, Scope It, Stop It
      • Access Suspending Functions Anywhere
      • Fix a Scope to Plug a Memory Leak
      • Get Rid of Unwanted Tasks
      • What Have We Learned?
    • Split Up to Speed Up excerpt
      • Write Code That Can Multitask
      • Download Two Things at Once
      • What Have We Learned?
    • Plan for Any Outcome
      • Build a Hierarchy of Tasks and Subtasks
      • Keep Track of Every Exception
      • Customize Your Error Handling
      • What Have We Learned?
    • Cooperate with Cancellation
      • Give a Task a Time Limit
      • Keep Clear of Cancellation Exceptions
      • Suspend a Cancelled Coroutine
      • What Have We Learned?
    • Unlock Parallel Processing excerpt
      • Launch Millions of Tasks
      • Dispatch to Multiple Cores
      • Teach a Selfish Function to Share
      • What Have We Learned?
  • Better Together
    • Call Blocking Functions Safely
      • Keep Your Functions Honest
      • Block That Thread, Not This One
      • Make Hard Work Look Easy
      • What Have We Learned?
    • Upgrade Every Callback
      • Mix Coroutines and Futures
      • Build Your Own Suspension Point
      • Lift the Continuation Curtain
      • What Have We Learned?
    • Go with the Flow
      • Run, Return, Resume, Repeat
      • Wrap it up Safely
      • Download Page After Page
      • What Have We Learned?
    • Operate the Reactive Way
      • Transform from Flow to Flow
      • End a Flow Early
      • Publish a Reactive Stream
      • What Have We Learned?
    • Share Flows, Connect Channels excerpt
      • Communicate Between Coroutines
      • React to a Repeating Callback
      • Share Once, Observe Everywhere
      • What Have We Learned?
    • Unit Test Without Delay
      • Write Quick Tests for Slow Code
      • Expand Your Testing Toolkit
      • What Have We Learned?

Author

Sam Cooper has been working with Kotlin coroutines since their first release, most recently as a tech lead and principal engineer. He has developed software at internationally recognized technology companies, including Amazon Web Services. His writing has been featured in community publications such as Kotlin Weekly, Android Weekly, and Software Testing Weekly.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $30.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Mar 2026

Beta Books: What do I get?

Related Titles:

Skill Level Meter

About This Title

Pages: 250
Published: March 2026
ISBN: 9798888651551
Edition: 1
In Beta