Member-only story

Swift Thread-Safe Arrays

Be careful! This applies to value types!

Steven Curtis
2 min readSep 15, 2020
Photo by amirali mirhashemian on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 11.7, and Swift 5.2.4

Prerequisites:

Terminology

Array: An ordered series of objects which are the same type
Concurrency: means that two tasks can start, run and complete in overlapping time periods
Parallelism: is about performing work at the same time

The motivation

Concurrency is a big part of programming, and this article covers where you may actually encounter this in your day-to-day work as an iOS programmer.

Since many devices (including iOS devices) embrace the principles of parallelism (that is, executing on many threads at the same time).

There is a special type of problem in Computer Science — The Readers-Writers problem.

--

--

Responses (1)