Hi folks, can you please advise me, there is an example like this:
public class Movie {
var isFavorite = false
}
let movie = Movie()
var sample: @Sendable () -> Void = {
movie.isFavorite.toggle()
}
print(movie.isFavorite)
There is example: Compiler Explorer
My question is that my class is not Sendable but yet Xcode does not warning, can you help me why this is so?
1 Like
mbrandonw
(Brandon Williams)
2
If you set concurrency warnings to "complete" in your project you will get the warning:
Capture of 'movie' with non-sendable type 'Movie' in a @Sendable closure
Huh, thanks so much, I realized why there was no warning. I tried to check in pod file and main project. The main project shows the warning, the pod file does not.