Page MenuHomePhabricator

D4380.id13904.diff
No OneTemporary

D4380.id13904.diff

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 <fcntl.h>
+#import <semaphore.h>
+
+#import <Foundation/Foundation.h>
+
+@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

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 2:26 AM (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2582088
Default Alt Text
D4380.id13904.diff (633 B)

Event Timeline