Add support for acquiring multiple locks at once (#958)

* Add ASLocking which supports -tryLock and taking multiple locks safely

* Better multi locking

* Assert about lock set capacity
This commit is contained in:
Adlai Holler
2018-06-05 12:31:30 -07:00
committed by GitHub
parent 9214e3c2ef
commit 35d59acd83
13 changed files with 209 additions and 46 deletions

View File

@@ -17,6 +17,7 @@
#import <Foundation/Foundation.h>
#import <AsyncDisplayKit/ASBaseDefines.h>
#import <AsyncDisplayKit/ASLocking.h>
NS_ASSUME_NONNULL_BEGIN
@@ -28,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
@end
AS_SUBCLASSING_RESTRICTED
@interface ASRunLoopQueue<ObjectType> : ASAbstractRunLoopQueue <NSLocking>
@interface ASRunLoopQueue<ObjectType> : ASAbstractRunLoopQueue <ASLocking>
/**
* Create a new queue with the given run loop and handler.