the.bay.news

Why isn't UserDefaults Sendable?

Swift Forums
Why isn't UserDefaults Sendable?
According to its documentation, UserDefaults is "is thread-safe, and you can use the same object in multiple threads or tasks simultaneously." However, it's not marked Sendable. Is there a reason? Obviously, I can mark it as @retroactive @unchecked Sendable, but I don't want to encourage this practice for other types, and I'm worried that I'm missing something.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.