mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-07 05:02:56 +00:00
ASRunLoopQueue can process a specified number of items per run loop iteration via a block based api.
23 lines
504 B
Objective-C
23 lines
504 B
Objective-C
//
|
|
// ASRunLoopQueue.h
|
|
// AsyncDisplayKit
|
|
//
|
|
// Created by Rahul Malik on 3/7/16.
|
|
// Copyright © 2016 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface ASRunLoopQueue<ObjectType> : NSObject
|
|
|
|
- (instancetype)initWithRunLoop:(CFRunLoopRef)runloop andHandler:(void(^)(ObjectType dequeuedItem, BOOL isQueueDrained))handlerBlock;
|
|
|
|
- (void)enqueue:(ObjectType)object;
|
|
|
|
@property (nonatomic, assign) NSUInteger batchSize;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END |