diff --git a/native/ios/Comm/TemporalMessageStorage/NonBlockingLock.h b/native/ios/Comm/TemporalMessageStorage/NonBlockingLock.h new file mode 100644 --- /dev/null +++ b/native/ios/Comm/TemporalMessageStorage/NonBlockingLock.h @@ -0,0 +1,14 @@ +#import +#import + +#import + +@interface NonBlockingLock : NSObject +@property(readonly) const char *lockName; +@property(readonly, atomic) sem_t *lockHandle; + +- (instancetype)initWithName:(NSString *)lockName; +- (BOOL)tryAcquireLock:(NSError **)err; +- (void)releaseLock:(NSError **)err; +- (void)destroyLock:(NSError **)err; +@end