Mark ASRunLoopQueue as drained if it contains only NULLs (#558)

* Mark ASRunLoopQueue as drained if it contains only NULLs

* Update CHANGELOG.md

* Cover ASRunLoopQueue with tests

* Include PR link in CHANGELOG.md

* Replace license header of ASRunLoopQueueTests.m with correct one

* Insert a nil in _internalQueue to ensure compaction, instead of maintaining a state for _isQueueDrained
This commit is contained in:
César Estébanez Tascón
2017-09-11 22:32:25 +02:00
committed by Garrett Moon
parent 7c7a4acf0e
commit 002c2d6978
5 changed files with 184 additions and 3 deletions

View File

@@ -41,6 +41,8 @@ AS_SUBCLASSING_RESTRICTED
- (void)enqueue:(ObjectType)object;
@property (nonatomic, readonly) BOOL isEmpty;
@property (nonatomic, assign) NSUInteger batchSize; // Default == 1.
@property (nonatomic, assign) BOOL ensureExclusiveMembership; // Default == YES. Set-like behavior.