Skip to content

Commit

Permalink
Limit background operations to one thread
Browse files Browse the repository at this point in the history
  • Loading branch information
phoboslab committed Oct 18, 2012
1 parent e2bdc48 commit 5511406
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Ejecta/EJApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ - (id)initWithWindow:(UIWindow *)windowp {
paused = false;
internalScaling = 1;


// Limit all background operations (image & sound loading) to one thread
opQueue = [[NSOperationQueue alloc] init];
opQueue.maxConcurrentOperationCount = 1;

timers = [[EJTimerCollection alloc] init];

displayLink = [[CADisplayLink displayLinkWithTarget:self selector:@selector(run:)] retain];
Expand Down

0 comments on commit 5511406

Please sign in to comment.