Add Support for the Run Loop Queue to be Weak (#3214)

* Add support for the run loop queue to be weak

* Go back to using a deque for itemsToProcess

* Update comment
This commit is contained in:
Adlai Holler
2017-03-23 15:43:31 -07:00
committed by GitHub
parent 740fc3f4c1
commit d3d0f7be09
4 changed files with 38 additions and 15 deletions

View File

@@ -2066,7 +2066,8 @@ NSString * const ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp = @"AS
static ASRunLoopQueue<ASDisplayNode *> *renderQueue;
dispatch_once(&onceToken, ^{
renderQueue = [[ASRunLoopQueue<ASDisplayNode *> alloc] initWithRunLoop:CFRunLoopGetMain()
andHandler:^(ASDisplayNode * _Nonnull dequeuedItem, BOOL isQueueDrained) {
retainObjects:NO
handler:^(ASDisplayNode * _Nonnull dequeuedItem, BOOL isQueueDrained) {
[dequeuedItem _recursivelyTriggerDisplayAndBlock:NO];
if (isQueueDrained) {
CFTimeInterval timestamp = CACurrentMediaTime();