Skip to main content

Swift Concurrency by Example

About 8 minSwiftArticle(s)bloghackingwithswift.comcrashcourseswiftxcodeappstore

Swift Concurrency by Example 관련

HACKING WITH SWIFT

Swift Concurrency by Example

Swift Concurrency by Example is the largest free book teaching all aspects of Swift concurrency, walking you through the many and varied ways of running concurrent code in Swift such as async/await, tasks, actors, and more.

Introduction
This stuff is hard | Swift Concurrency by Example

This stuff is hard
How to follow this guide | Swift Concurrency by Example

How to follow this guide
Concurrency vs parallelism | Swift Concurrency by Example

Concurrency vs parallelism
Understanding threads and queues | Swift Concurrency by Example

Understanding threads and queues
Main thread and main queue: what’s the difference? | Swift Concurrency by Example

Main thread and main queue: what’s the difference?
Where is Swift concurrency supported? | Swift Concurrency by Example

Where is Swift concurrency supported?
Dedication | Swift Concurrency by Example

Dedication
Async/await
What is a synchronous function? | Swift Concurrency by Example

What is a synchronous function?
What is an asynchronous function? | Swift Concurrency by Example

What is an asynchronous function?
How to create and call an async function | Swift Concurrency by Example

How to create and call an async function
How to call async throwing functions | Swift Concurrency by Example

How to call async throwing functions
What calls the first async function? | Swift Concurrency by Example

What calls the first async function?
What’s the performance cost of calling an async function? | Swift Concurrency by Example

What’s the performance cost of calling an async function?
How to create and use async properties | Swift Concurrency by Example

How to create and use async properties
How to call an async function using async let | Swift Concurrency by Example

How to call an async function using async let
What’s the difference between await and async let? | Swift Concurrency by Example

What’s the difference between await and async let?
Why can’t we call async functions using async var? | Swift Concurrency by Example

Why can’t we call async functions using async var?
How to use continuations to convert completion handlers into async functions | Swift Concurrency by Example

How to use continuations to convert completion handlers into async functions
How to create continuations that can throw errors | Swift Concurrency by Example

How to create continuations that can throw errors
How to store continuations to be resumed later | Swift Concurrency by Example

How to store continuations to be resumed later
How to fix the error “async call in a function that does not support concurrency” | Swift Concurrency by Example

How to fix the error “async call in a function that does not support concurrency”
Sequences and streams
What’s the difference between Sequence, AsyncSequence, and AsyncStream? | Swift Concurrency by Example

What’s the difference between Sequence, AsyncSequence, and AsyncStream?
How to loop over an AsyncSequence using for await | Swift Concurrency by Example

How to loop over an AsyncSequence using for await
How to manipulate an AsyncSequence using map(), filter(), and more | Swift Concurrency by Example

How to manipulate an AsyncSequence using map(), filter(), and more
How to create a custom AsyncSequence | Swift Concurrency by Example

How to create a custom AsyncSequence
How to convert an AsyncSequence into a Sequence | Swift Concurrency by Example

How to convert an AsyncSequence into a Sequence
Tasks and task groups
What are tasks and task groups? | Swift Concurrency by Example

What are tasks and task groups?
How to create and run a task | Swift Concurrency by Example

How to create and run a task
What’s the difference between a task and a detached task? | Swift Concurrency by Example

What’s the difference between a task and a detached task?
How to get a Result from a task | Swift Concurrency by Example

How to get a Result from a task
How to control the priority of a task | Swift Concurrency by Example

How to control the priority of a task
Understanding how priority escalation works | Swift Concurrency by Example

Understanding how priority escalation works
How to cancel a Task | Swift Concurrency by Example

How to cancel a Task
How to make a task sleep | Swift Concurrency by Example

How to make a task sleep
How to voluntarily suspend a task | Swift Concurrency by Example

How to voluntarily suspend a task
How to create a task group and add tasks to it | Swift Concurrency by Example

How to create a task group and add tasks to it
How to cancel a task group | Swift Concurrency by Example

How to cancel a task group
How to handle different result types in a task group | Swift Concurrency by Example

How to handle different result types in a task group
What’s the difference between async let, tasks, and task groups? | Swift Concurrency by Example

What’s the difference between async let, tasks, and task groups?
How to make async command-line tools and scripts | Swift Concurrency by Example

How to make async command-line tools and scripts
How to create and use task local values | Swift Concurrency by Example

How to create and use task local values
How to run tasks using SwiftUI’s task() modifier | Swift Concurrency by Example

How to run tasks using SwiftUI’s task() modifier
Is it efficient to create many tasks? | Swift Concurrency by Example

Is it efficient to create many tasks?
Actors
What is an actor and why does Swift have them? | Swift Concurrency by Example

What is an actor and why does Swift have them?
How to create and use an actor in Swift | Swift Concurrency by Example

How to create and use an actor in Swift
How to make function parameters isolated | Swift Concurrency by Example

How to make function parameters isolated
How to make parts of an actor nonisolated | Swift Concurrency by Example

How to make parts of an actor nonisolated
How to use @MainActor to run code on the main queue | Swift Concurrency by Example

How to use @MainActor to run code on the main queue
Understanding how global actor inference works | Swift Concurrency by Example

Understanding how global actor inference works
What is actor hopping and how can it cause problems? | Swift Concurrency by Example

What is actor hopping and how can it cause problems?
What’s the difference between actors, classes, and structs? | Swift Concurrency by Example

What’s the difference between actors, classes, and structs?
Important: Do not use an actor for your SwiftUI data models | Swift Concurrency by Example

Important: Do not use an actor for your SwiftUI data models
Solutions
How to download JSON from the internet and decode it into any Codable type | Swift Concurrency by Example

How to download JSON from the internet and decode it into any Codable type

이찬희 (MarkiiimarK)
Never Stop Learning.