Swift 5.5 —Acquiring thread locks & sync made easy with Actor isolation

What is a lock?

One of the more difficult problems in developing concurrent programs is dealing with data races. Actors provide a model for building concurrent programs that are free of data races. They do so through data isolation: each actor protects is own instance data, ensuring that only a single thread will access that data at a given time. Actors shift the way of thinking about concurrency from raw threading to actors and put focus on actors “owning” their local state

“Which thread is the first to start isolated access?”




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Reasons to learn SwiftUI: The Powerful Language

What is Massive View Controller and How to avoid it in Swift

Declarative approach in Mobile development

Apple VR/AR: What’s On The Home Screen?

iOS: 7 critical issues we cannot overlook.

Swift Vs Objective C

What’s new in XCode 13 -Part2

macOS Big Sur: The New Rosetta 2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Berkin Tatlısu

Berkin Tatlısu


More from Medium

How ranges work in Swift

Stacks in Swift — Data Structure

From ObjC → Swift → ObjC: Part 2

iOS library support both Cocoapods and Swift Package Manager