Skip to content

update example code to make ReferenceFileDocument sendable #48

Open
@heckj

Description

latest Xcode (16) and associated SDKs have marked ReferenceFileDocument as Sendable. I inquired in the developer forums about this, and the DTS engineer kindly explained that it has to be Sendable - which means adding some structure in there - because the various methods are called from a number of different isolation domains.

The gist is that the class holds ~3-4 properties that are all possibly mutating, and all of those need to be locked down to Sendable, so wrapped within an OSUnfairAllocatedLock (as per updated ReferenceFileDocument code example).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions