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

What is the difference between swift UI and Storyboard

Developing twitter splash screen for iOS application

Discord v/s WhatsApp v/s Slack

Resolver: Swift 上的 dependency injection framework

Practical iOS Architecture: CoreData, CloudKit, Lists, and Editors

How to Disable SwiftLint Rules?

ARKit 911— Light estimation

CloudKit Sharing, Apple, and You

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

Developer

More from Medium

Just-in-time mutability

Protocols & Delegate 閱讀心得筆記

Type-safe assets in Swift

Building a To-Do App in Swift — Part 5