Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update example code to make ReferenceFileDocument sendable #48

Open
heckj opened this issue Oct 2, 2024 · 0 comments
Open

update example code to make ReferenceFileDocument sendable #48

heckj opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@heckj
Copy link
Collaborator

heckj commented Oct 2, 2024

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).

@heckj heckj added the enhancement New feature or request label Oct 2, 2024
@heckj heckj self-assigned this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant