-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a singleton NSOperationQueue that handles all of my network requests. I'm noticing, however, that when I have one particularly long operation running (this particular operation takes at least 25 seconds), my other operations don't run until it completes.
maxConcurrentOperationCount is set…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have an NSOperationQueue, in which I keep on adding NSOperation objects that hit server and brings data. Is there a way to store the received data in the order in which they were fired? For example, suppose the A, B and C objects are added in NSOperationQueue in the order ABC. Now each of the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Currently I'm using NSThread to cache images in another thread.
[NSThread detachNewThreadSelector:@selector(cacheImage:) toTarget:self withObject:image];
Alternatively:
[self performSelectorInBackground:@selector(cacheImage:) withObject:image];
Alternatively, I can use an NSOperationQueue
NSInvocationOperation…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I'm sitting here for at least half an hour to find a memory leak in my code.
I just replaced an synchronous call to a (touch) method with an asynchronous one using NSOperationQueue.
The Leak Inspector reports a memory leak after I did the change to the code.
What's wrong with the version using…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
As i understood, the threads provided by GCD do have a runloop but no source/port. Now i use some of methods that call AppleScripts thru AppleEvents inside an NSOperationQueue. And sometimes my app crashes with following stacktrace.
my questions:
Usage of AppleScript inside a NSInvocationOperation…
>>> More