Skip to content

Commit

Permalink
Document thread-safety requirements for ARTDeviceStorage
Browse files Browse the repository at this point in the history
This doesn’t change anything, it just explains the current behaviour of
the code.

ARTLocalDeviceStorage already conforms to these requirements, since it
uses the (already thread-safe) user defaults / keychain. However,
MockDeviceStorage does need some synchronisation. I’ll do that next.
  • Loading branch information
lawrence-forooghian committed May 5, 2022
1 parent 214795f commit 3f78a12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/ARTDeviceStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

NS_ASSUME_NONNULL_BEGIN

// Instances of ARTDeviceStorage should expect to have their methods called
// from any thread.
@protocol ARTDeviceStorage <NSObject>
- (nullable id)objectForKey:(NSString *)key;
- (void)setObject:(nullable id)value forKey:(NSString *)key;
Expand Down

0 comments on commit 3f78a12

Please sign in to comment.