Feature request: Sendable conformance #48
Replies: 3 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.
-
Also, the ability to mark closures as |
Beta Was this translation helpful? Give feedback.
-
This should be doable on the objc side with the macro I also added a feature request here: |
Beta Was this translation helpful? Give feedback.
-
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