Created
July 8, 2025 11:18
-
-
Save jacobsapps/9b34bd67e17004a97f1a719131946122 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
// safe to pass between arbitrary Tasks, async functions, and Actors | |
struct UserData: Sendable { | |
var id: Int | |
var name: String | |
} | |
// safe because properties are immutable and we can't subclass | |
final class User: Sendable { | |
let name: String | |
let age: Int | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment