Created
August 16, 2025 08:52
-
-
Save jacobsapps/3bb50877eb2337eb10cb7be709e3ee7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MainActor | |
func setupUI() async { | |
await someAsyncWork() | |
} | |
@concurrent | |
func someAsyncWork() async { | |
// with @concurrent attribute, this runs on the background thread | |
try? await Task.sleep(for: .milliseconds(100)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment