
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.
First Post!

bot
Corresponding tweet for this thread:
Share link for this tweet.
Popular Macos topics

New

How Apple’s rivals plan to catch up with the mighty M1 chip.
Apple Silicon is just getting started yet the initial reaction has been rap...
New

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

Goals
Performance equivalent to C arrays for subscript get/set of non-class element types is the most important performance goal.
It sho...
New

Malicious hackers have been exploiting a vulnerability in fully updated versions of macOS that allowed them to take screenshots on infect...
New

Apple’s leaders continue to deny developers of two obvious truths:
That our apps provide substantial value to iOS beyond the purchase c...
New

Swift 5.5 is here with Xcode 13 Beta and with it comes my favorite new addition to Swift: Async/Await.
Async/await is a high level, stru...
New

Learn how to use the brand new actor model to protect your application from unwanted data-races and memory issues.
New

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

Safari isn’t protecting the web, it’s killing it.
There’s been a lot of discussion recently about how “Safari is the new IE” (1, 2, 3, 4...
New
Other popular topics

Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New

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

I’ve been really enjoying obsidian.md:
It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New

poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New

Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face:
https://on...
New

Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New

I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me.
I think the Planck and the Preonic (o...
New

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

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New

This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New
Latest in Blogs/Talks
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /textmate
- /sublime-text
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /slackware
- /julia
- /c
- /neovim