Swift Concurrency Review Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

A collection of vocabulary flashcards covering the core terminology and concepts of Swift Concurrency as discussed in the reference guide.

Last updated 10:10 AM on 6/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

27 Terms

1
New cards

Concurrency

A way to structure code so that a single CPU core can juggle multiple programs, switching between them quickly so they appear to be running at the same time.

2
New cards

Parallelism

When two or more programs run at the exact same instant, typically enabled by using multiple CPU cores.

3
New cards

Main Thread

The initial thread created when an app launches, which must be used for all user interface work throughout the lifetime of the application.

4
New cards

Context Switch

The performance cost incurred when a system stashes the data for one thread to give another thread a chance to run on the CPU.

5
New cards

Thread Explosion

A performance crisis occurring when a program creates significantly more threads than available CPU cores, causing high overhead from context switching.

6
New cards

Synchronous Function

A function that executes all its work in a simple, straight line on a single thread and blocks that thread until the work is finished.

7
New cards

Asynchronous Function

A function marked with the async keyword that can perform work and suspend itself, allowing its thread to be used for other tasks while it waits for a result.

8
New cards

Suspension Point

A location in code, explicitly marked by the await keyword, where an asynchronous function can pause execution and give up its thread.

9
New cards

async let

A syntax used to start several asynchronous operations immediately and concurrently, allowing the program to continue until the values are specifically needed.

10
New cards

Sendable

A protocol and attribute used to ensure that data can be safely transferred across actor boundaries or between different tasks without causing data races.

11
New cards

Continuation

A special object used to bridge older code using completion handlers into modern async/await functions.

12
New cards

Checked Continuation

A type of continuation where Swift performs runtime checks to ensure the object is resumed exactly once, crashing if it is called multiple times or leaking a warning if it is never called.

13
New cards

AsyncSequence

An asynchronous version of the standard Sequence protocol where each element is returned asynchronously, typically handled using for await loops.

14
New cards

AsyncStream

A type of buffered asynchronous sequence that allows multiple values to be yielded over time, including different policies for buffering or discarding values.

15
New cards

Task

A basic unit of asynchronous work that runs immediately and concurrently with other code, providing a way to call async functions from synchronous contexts.

16
New cards

Detached Task

A unit of asynchronous work that does not inherit context from its creator, such as its priority, actor isolation, or task-local values.

17
New cards

Task Group

A collection of concurrent tasks that work together to produce a single result, often used when the number of required operations is dynamic.

18
New cards

Discarding Task Group

A specialized group where child tasks are automatically destroyed upon completion to prevent memory leaks in long-running operations.

19
New cards

Cooperative Cancellation

The mechanism by which a task is notified to stop working, requiring the code to voluntarily check Task.isCancelled or call Task.checkCancellation() to terminate safely.

20
New cards

Task-local values

Scoped metadata attached to a task that can be read by any code running within that task's hierarchy.

21
New cards

Actor

A reference type similar to a class that protects its mutable state by ensuring only one piece of code can access its data at any one time.

22
New cards

Actor Isolation

The protection mechanism where an actor's variables and methods can only be accessed asynchrononously from outside the actor to prevent data races.

23
New cards

Nonisolated

A keyword used to mark specific methods or properties that do not participate in an actor's isolation, such as constants or methods that only access safe state.

24
New cards

Actor Reentrancy

A design feature where an actor is allowed to begin a new task while a previous task is suspended at an await point, preventing deadlocks but requiring careful local state management.

25
New cards

Actor Hopping

The process of execution moving from one actor to another, which can incur a performance cost in the form of a context switch.

26
New cards

@MainActor

A global actor that ensures a type or method always executes on the main thread, primarily used for safe user interface updates.

27
New cards

Cooperative Thread Pool

The internal system Swift uses to manage a pool of threads that matches the number of CPU cores to execute tasks efficiently without thread explosion.