Skip to content

Design Guidelines #9

Closed
Closed
@mattmassicotte

Description

@mattmassicotte

I'm not certain if this belongs in "Common Errors", or more something else. But I'd really like to expand on the trade-offs of fine- vs coarse-grained isolation.

For example:

class SomeClass {
    @MainActor
    var isolatedValue = 1
}

vs

actor SomeClass {
    @MainActor
    var isolatedValue = 1
}

vs

@MainActor
class SomeClass {
    var isolatedValue = 1
}

Especially to tie in the use of nonisolated for selectively opting-out of whatever domain your type is part of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions