Skip to content

Commit

Permalink
SVG URL loader / parser refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
djphoenix committed May 13, 2015
1 parent ebbd7f0 commit 59f7d72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pxSVG/pxSVGLayer.m
Expand Up @@ -23,7 +23,7 @@ + (NSOperationQueue*)loadQueue
if (!lq) {
lq = [NSOperationQueue new];
lq.name = @"pxSVG Load queue";
[lq setMaxConcurrentOperationCount:1];
[lq setMaxConcurrentOperationCount:10];
}
return lq;
}
Expand All @@ -34,7 +34,7 @@ + (NSOperationQueue*)parseQueue
if (!pq) {
pq = [NSOperationQueue new];
pq.name = @"pxSVG Parser queue";
[pq setMaxConcurrentOperationCount:1];
[pq setMaxConcurrentOperationCount:10];
}
return pq;
}
Expand All @@ -49,7 +49,7 @@ - (void)loadURL:(NSURL *)url
{
[self clean];
__weak pxSVGLayer *weakself = self;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
NSURLResponse *resp;
NSError *err;
NSData *data;
Expand Down Expand Up @@ -84,7 +84,7 @@ - (void)loadString:(NSString *)string
{
[self clean];
__weak pxSVGLayer *weakself = self;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
pxSVGImage *img = [pxSVGImage svgImageWithXML:string];
if ([op isCancelled]) return;
NSBlockOperation *sync = [NSBlockOperation blockOperationWithBlock:^{
Expand Down

0 comments on commit 59f7d72

Please sign in to comment.