Profile Pictureeditorscut
$30

The Curious Case of the Async Cafe

16 ratings
Add to cart

The Curious Case of the Async Cafe

$30
16 ratings

This is it - your introduction to all you need to use async await and friends.

"I laughed, I cried, it moved me - eventually" - a fake Chat Bot review we made up


Swift's solution to asynchronous and concurrent code is now part of the language itself. The new syntax is easier to read and follow the logical flow of what in the past was complicated, fragmented, or deeply nested. With async/await you'll focus on tasks instead of threads or even queues.

"The Curious Case of the Async Cafe" is a quirky fast-paced tour of the components of modern concurrency in Swift including async, await, Tasks, using continuations to replace and wrap delegates and closure-based APIs, AsyncSequences and AsyncStreams, structured concurrency using async let and Task Groups, and, of course, actors.

Updated for Xcode 14 and Swift 5.7 and tested on Apple Silicon. 

Contents

  • Chapter 1: Async, Await, and Task
    • We Begin
    • Errors
    • The (too) Big Sleep
    • Introducing async / await
    • Task
    • Async and Errors
    • Testing
    • Be Careful
  • Chapter 2: Continuations
    • The Delegate Pattern
    • Delegate to Continuations
    • Multiple Continuations
    • Unsafe Continuations
    • Throwing Continuations
    • Closures and Callbacks
    • Async Alternatives
    • Async Wrappers
    • Refactorings
    • URLSession and Closures with Errors
  • Chapter 3: AsyncSequences and AsyncStreams
    • Notifications
    • Introducing AsyncStream
    • Sequences of Notifications
    • Sendable and Actor Boundaries
    • Transforming AsyncSequences
    • Sequence Pipelines
    • Combine
    • AsyncStream Continuations
    • Continuous Delivery
    • AsyncAlgorithms
  • Chapter 4: Structured Concurrency
    • Unstructured Async Calls
    • Async Let
    • Cancelling Tasks
    • Task Values
    • Unstructured App Store Search
    • TaskGroups
    • Sequences of TaskGroups
    • AsyncImage
  • Chapter 5: Actors
    • On and Off the Main Actor
    • Shared Mutable State
    • Actors
    • Suspending and Reentrancy
    • Nonisolated Members
    • Communication between Actors
    • Global Actors
    • TaskLocal
    • Creating Distributed Actors
    • Using Distributed Actors
    • Epilogue


Add to cart
Pages
574
Xcode Version
14.x
Copy product URL

Ratings

4.9
(16 ratings)
5 stars
94%
4 stars
0%
3 stars
6%
2 stars
0%
1 star
0%