CommunityNews

CommunityNews

MainActor usage in Swift explained to dispatch to the main thread

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. When building apps, it’s important to perform UI updating tasks on the main thread, which can sometimes be challenging when using several background threads. Using the @MainActor attribute will help you make sure your UI is always updated on the main thread.

Read in full here:

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

Where Next?

Popular Macos topics Top

First poster: bot
Library Extension helps you find library books, but it doesn’t work on Safari—yet. At WWDC 2020, Apple announced it was going to support...
New
First poster: bot
Apple has acquired about 100 companies over the last six years, the company’s chief executive Tim Cook has revealed. That works out at a...
New
First poster: bot
The Swift concurrency model intends to provide a safe programming model that statically detects data races and other common concurrency b...
New
First poster: bot
mathiasbynens/dotfiles. :wrench: .files, including ~/.macos — sensible hacker defaults for macOS - mathiasbynens/dotfiles This threa...
New
First poster: AstonJ
Over the past few years, Apple seems increasingly willing to cooperate with authoritarian governments, uninterested in protecting its own...
New
First poster: bot
Fed up with the Mac, I spent six months with a Linux laptop. The grass is not greener on the other side April 02, 2021 — Carlos Fenollosa...
New
First poster: bot
The report speculates that Apple’s increased use of Google Cloud suggests the company’s rising cloud storage requirements have outpaced i...
New
New
First poster: bot
YouTuber strips old iMac of its components and turns it into a 5K monitor.
New
AstonJ
Well my dev environment started to mess up so thought it was time for a clean install - I’ve been meaning to do one for a while anyway. T...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
RobertRichards
Hair Salon Games for Girls Fun Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New
mindriot
Ok, well here are some thoughts and opinions on some of the ergonomic keyboards I have, I guess like mini review of each that I use enoug...
New