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

Unit / Dimension concurrency warnings. Add Sendable conformance? #471

Open
tcldr opened this issue Mar 8, 2024 · 0 comments
Open

Unit / Dimension concurrency warnings. Add Sendable conformance? #471

tcldr opened this issue Mar 8, 2024 · 0 comments

Comments

@tcldr
Copy link

tcldr commented Mar 8, 2024

I'm not sure of the best place to surface this, but as mentioned on this Swift forums post it seems to me that the explicit, unavailable Sendable conformance of Unit and Dimension, is incompatible with the stated usage of Unit and Dimension.

Specifically, in strict concurrency 'complete' mode, the Swift 5.10 compiler flags the creation of static properties with the warning 'Static property 'x' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor'. Of course, Isolating properties to an Actor isn't feasible either as not only does being tied to an Actor limit the utility of the class, but the the properties become inaccessible to the essential baseUnit override.

Perhaps this is something that #237 will address?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant