Avatar
Avatar
Iceman
お〜これでいけました!ここに @Sendable つけるんですね😅
以前同じところでハマって↓を見て「そうなんだ」って思ったことを思い出しましたw https://forums.swift.org/t/asyncstream-and-progress-reporting/50588/7 Sendableチェックは↓に向けて色々変わっているみたいですね。そしてプロポーザル通りにチェックされないところもあって僕もまだよくわかってない状態です😅 https://forums.swift.org/t/pitch-staging-in-sendable-checking/51341
I get it now. The onTermination closure needs to be annotated with @Sendable: continuation.onTermination = { @Sendable termination in … }
Hi all! SE-0302 introduced the Sendable protocol, which is used to indicate which types have values that can safely be copied across actors or, more generally, into any context where a copy of the value might be used concurrently with the original. Applied uniformly to all Swift code, Sendable checking eliminates a large class of data races cau...