mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-15 21:21:45 +00:00
added limit to app asset request
This commit is contained in:
@@ -19,11 +19,14 @@
|
|||||||
NSMutableDictionary* _imageCache;
|
NSMutableDictionary* _imageCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const int MAX_REQUEST_COUNT = 4;
|
||||||
|
|
||||||
- (id) initWithCallback:(id<AppAssetCallback>)callback {
|
- (id) initWithCallback:(id<AppAssetCallback>)callback {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
_callback = callback;
|
_callback = callback;
|
||||||
_opQueue = [[NSOperationQueue alloc] init];
|
|
||||||
_imageCache = [[NSMutableDictionary alloc] init];
|
_imageCache = [[NSMutableDictionary alloc] init];
|
||||||
|
_opQueue = [[NSOperationQueue alloc] init];
|
||||||
|
[_opQueue setMaxConcurrentOperationCount:MAX_REQUEST_COUNT];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user