Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3363529
D4380.id13904.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
633 B
Referenced Files
None
Subscribers
None
D4380.id13904.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4380: Define interface for inter process non-blocking binary lock based on POSIX semaphore
Attached
Detach File
Event Timeline
Log In to Comment