Skip to content

Commit

Permalink
Changes to fit better with Bedrock design
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienPetrilli committed Nov 7, 2023
1 parent 6d9e6b0 commit 29833c7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions _posts/2023-11-30-swift-concurrency-in-a-nutshell.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ author: d_petrilli
tags: [swift, apple, xcode]
color: rgb(251,87,66) # this is Bedrock color here
---
## Introduction

As modern apps grow in complexity and features, the need for multitasking to enhance the user experience becomes evident. Whether processing large datasets or querying multiple systems over the network, concurrency is essential.

This article presents a concise, yet comprehensive overview of Swift's Concurrency, highlighting its key features and core concepts. Swift's approach to concurrency provides several benefits:
Expand All @@ -18,17 +16,17 @@ This article presents a concise, yet comprehensive overview of Swift's Concurren

Before delving into Swift's concurrency paradigms, let's familiarize ourselves with foundational terminology.

### Concurrency
#### Concurrency

Concurrency is about structuring your code so that tasks can be executed independently. It provides mechanisms for synchronization, communication, and coordination between units of work to avoid race conditions and ensure proper execution. However, concurrency doesn't imply parallel execution; the actual mode of execution is determined separately.

Designing your code effectively for concurrency makes adding parallelism nearly free.

### Parallelism
#### Parallelism

Parallelism is the simultaneous execution of tasks across multiple processing units, guaranteeing genuine concurrent progression of operations. It's a specific form of concurrency where tasks are actually executed at the same time.

### Structured Concurrency
#### Structured Concurrency

Traditionally, developers had to manually manage `threads`, `locks`, and `callbacks`, leading to code that is difficult to manage and error prone. Even with a lot of discipline, it was really hard to get right as the cognitive load was so high.

Expand Down

0 comments on commit 29833c7

Please sign in to comment.