mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Added newRequestQueueWithName to the API
This commit is contained in:
@@ -65,6 +65,22 @@ static const NSTimeInterval kFlushDelay = 0.3;
|
||||
return [[self new] autorelease];
|
||||
}
|
||||
|
||||
+ (id)newRequestQueueWithName:(NSString*)name {
|
||||
if (RKRequestQueueInstances == nil) {
|
||||
RKRequestQueueInstances = [NSMutableArray new];
|
||||
}
|
||||
|
||||
if ([self requestQueueExistsWithName:name]) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
RKRequestQueue* queue = [self new];
|
||||
queue.name = name;
|
||||
[RKRequestQueueInstances addObject:[NSValue valueWithNonretainedObject:queue]];
|
||||
|
||||
return queue;
|
||||
}
|
||||
|
||||
+ (id)requestQueueWithName:(NSString *)name {
|
||||
if (RKRequestQueueInstances == nil) {
|
||||
RKRequestQueueInstances = [NSMutableArray new];
|
||||
|
||||
Reference in New Issue
Block a user