CommunityNews

CommunityNews

Swift Evolution - Actors

The Swift concurrency model intends to provide a safe programming model that statically detects data races and other common concurrency bugs. The Structured Concurrency proposal introduces a way to define concurrent tasks and provides data-race safety for functions and closures. This model is suitable for a number of common design patterns, including things like parallel maps and concurrent callback patterns, but is limited to working with state that is captured by closures.

Swift includes classes, which provide a mechanism for declaring mutable state that is shared across the program. Classes, however, are notoriously difficult to correctly use within concurrent programs, requiring error-prone manual synchronization to avoid data races. We want to provide the ability to use shared mutable state while still providing static detection of data races and other common concurrency bugs.

The actor model defines entities called actors that are perfect for this task. Actors allow you as a programmer to declare that a bag of state is held within a concurrency domain and then define multiple operations that act upon it. Each actor protects its own data through data isolation, ensuring that only a single thread will access that data at a given time, even when many clients are concurrently making requests of the actor. As part of the Swift Concurrency Model, actors provide the same race and memory safety properties as structured concurrency, but provide the familiar abstraction and reuse features that other explicitly declared types in Swift enjoy…

This thread was posted by one of our members via one of our news source trackers.

First Post!

bot

bot

Corresponding tweet for this thread:

Share link for this tweet.

Popular Macos topics Top

New
First poster: bot
Really, really add /usr/local/bin to the PATH variable on macOS. In newer macOS custom executables belong in a directory which is not in...
New
First poster: bot
After months of silence about Apple’s impressive M1 chip, Intel just clapped back with a carefully crafted takedown of the Arm-based chip...
New
First poster: bot
While for the most part, the war of words between the tech titans has remained professional, Mark Zuckerberg and Tim Cook have also share...
New
First poster: bot
1 Background 1.1 Swift TLDR 1.2 What Is ABI Stability and Dynamic Linking 1.3 Swift’s Stable ABI 1.4 Resilience and Library Evolution ...
New
First poster: bot
Executive Summary TCC is meant to protect user data from unauthorized access, but weaknesses in its design mean that protections are eas...
New
First poster: bot
MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks on the main thread....
New
First poster: Maartz
Until its recent demise, Internet Explorer was the browser hated most by web developers. Internet Explorer is now a thing of the past, r...
New
New
First poster: bot
Recommended settings for Wi-Fi routers and access points. For the best security, performance, and reliability, we recommend these settin...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

Latest in Blogs/Talks

View all threads ❯