Permalink
Browse files

Limit background operations to one thread

  • Loading branch information...
1 parent e2bdc48 commit 55114065de1eedf8bc00230a0fc71aa69e99827c @phoboslab committed Oct 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Classes/Ejecta/EJApp.m
View
4 Classes/Ejecta/EJApp.m
@@ -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];

0 comments on commit 5511406

Please sign in to comment.