Aleksei Danilov
Aleksei Danilov

Reputation: 645

Is UserDefaults thread safe in Swift? How to check it?

Is UserDefaults thread safe in Swift? How to check it? For example, if there 10 thread write data with UserDafaults. How we can check that is Thread Safe?

Upvotes: 5

Views: 4164

Answers (1)

Rashwan L
Rashwan L

Reputation: 38833

Yes it is:

The UserDefaults class is thread-safe.

Reference from Apples documentation.

Upvotes: 18

Related Questions