Feature request: Sendable conformance #48
russellporter
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
@russellporter you can use You won't need to extend your DataClass with Sendable but some cases still need some migration from SKIE (async/await) or Kotlin cinterop itself. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Also, the ability to mark callbacks as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been looking at enabling stronger concurrency checking in our Swift codebase, to help spot issues and get ready for Swift 6. We have many immutable data classes in our KMP library which we assume are safe to be marked as
@unchecked Sendable
.Currently we annotate the KMP types from our Swift codebase. However it is far away from the type declaration in Kotlin, which makes it fragile. For example:
It seems like SKIE potentially could help a lot here:
@UncheckedSendable
annotation for kotlin types. Being able to declare it directly on the type in Kotlin code would make the API contract more explicit.Sendable
. I couldn't find a way to do this yet.@CheckedSendable
annotation for kotlin types. This would provide a compile time guarantee that a kotlin type is fully Sendable, similar to how Swift compiler does it. I assume this is very hard if not impossible.Beta Was this translation helpful? Give feedback.
All reactions