Skip to content
Discussion options

You must be logged in to vote

Although the docs say that backgroundTask's closure isn't @Sendable, it does seem to be the case in the Swift headers:

public func backgroundTask<D, R>(_ task: BackgroundTask<D, R>, action: @escaping @Sendable (D) async -> R) -> some Scene where D : Sendable, R : Sendable

No idea why the docs are wrong, but maybe a feedback should be filed.

Also, even the refreshable closure is marked as @Sendable as can be seen in the Swift headers, but again the docs report it as being merely @escaping. So, it seems weird that we get the sendable warning for backgroundTask but not refreshable.

Well, to figure out why we had to go all the way into the .swiftinterface file, and there we can see a big diff…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kamcma
Comment options

@kamcma
Comment options

Answer selected by kamcma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants