nsoperation Questions
6
Solved
I have this code to add a NSOperation instance to a queue
let operation = NSBlockOperation()
operation.addExecutionBlock({
self.asyncMethod() { (result, error) in
if operation.cancelled {
retur...
Dorchester asked 29/10, 2015 at 15:6
7
Solved
I have an Operation subclass and Operation queue with maxConcurrentOperationCount = 1.
This performs my operations in a sequential order that i add them which is good but now i need to wait until ...
Overbuild asked 27/2, 2017 at 21:7
3
Solved
Thanks in advance for help,
I have two API calls, both are concurrent and any call could be success first(I don't want call in sequence), after success of both calls, I have to stop my activity ind...
Klaraklarika asked 27/5, 2018 at 23:32
17
Solved
NSOperationQueue has waitUntilAllOperationsAreFinished, but I don't want to wait synchronously for it. I just want to hide progress indicator in UI when queue finishes.
What's the best way to acco...
Exsanguinate asked 26/6, 2009 at 13:0
10
Solved
I would like a for in loop to send off a bunch of network requests to firebase, then pass the data to a new view controller once the the method finishes executing. Here is my code:
var datesArray ...
Nassi asked 10/3, 2016 at 2:37
3
Solved
As the title suggests, what is the default value of the maxConcurrentOperationCount for NSOperationQueue?
Is it set to a value of 1?
Sounding asked 21/2, 2013 at 6:19
9
Solved
I'm learning about concurrent programming for iOS. So far I've read about NSOperation/NSOperationQueue and GCD. What are the reasons for using NSOperationQueue over GCD and vice versa?
Sounds like...
Huonghupeh asked 29/4, 2012 at 15:24
3
Solved
i need to put asynchronous operations into an operation queue, however, they need to execute on after the other
self.operationQueue = [NSOperationQueue new];
self.operationQueue.maxConcurrentOpera...
Egestion asked 12/11, 2014 at 14:54
4
I'm fetching some data from Facebook Connect (using the FBConnect Objective-C 2.0 framework) and I'm doing all that in an NSOperation. It is in an NSOperation because I have several other operation...
Skyline asked 20/10, 2009 at 17:33
5
Solved
I have an app that has to download multiple large files. I want it to download each file one by one sequentially instead of concurrently. When it runs concurrently, the app gets overloaded and cras...
Aestivate asked 1/9, 2015 at 1:50
3
Solved
I need to pause a running NSOperation which was inserted in an NSOperationQueue. Currently I am canceling all operations and restarting them. But this would lead to some kind of duplication in term...
Jessabell asked 16/8, 2012 at 8:50
3
Solved
I've written some asynchronous unit tests with XCTest expectations to test a networking class I wrote. Most of my tests work every time.
There are a few tests that fail when I run the whole suite...
Auberta asked 21/1, 2015 at 21:17
2
My question is related to the "Delta Download" thing as it was named in WWDC 2014 Advanced CloudKit.
I'm trying to make syncronization for my Core Data app, which is iPhone only for now (think: th...
Castellany asked 5/5, 2016 at 23:2
2
Solved
I'm downloading files using NSOperation (s) and adding them NSOperationQueue. NSOperationQueue is getting suspended when app goes in the background. Is there any work around if queue will not suspe...
Iyre asked 13/12, 2012 at 9:49
3
Solved
There are 3 Operations in my OperationQueue and i'm not able to cancel specific operation from them.
I referred this example but i can't understand it
NSOperationQueue cancel specific operations
...
Casease asked 27/1, 2020 at 7:35
7
Solved
I'm trying to build a bulk image downloader, where images can be added to a queue on the fly to be downloaded, and I can find out the progress and when they're done downloading.
Through my reading...
Candiscandle asked 20/2, 2014 at 20:24
8
Referring https://developer.apple.com/reference/foundation/operation, I am having Playground setup as -
class myOperation1 : Operation {
override func main() {
print("op1 working....")
}
}
cla...
Purine asked 14/2, 2017 at 9:50
3
Solved
I am trying to get started with using Operations in a side project rather than having closure-based callbacks littered throughout my networking code to help eliminate nested calls. So I was doing s...
Plaque asked 22/4, 2017 at 15:42
4
NSOperationQueue creates many threads, as you'd expect, and desire. But when you pause the app and debug it in Xcode, it's unclear which threads belong to one operation queue and which belong to an...
Picoline asked 21/3, 2013 at 23:14
3
Solved
I've got a bunch of NSOperations added to a NSOperationQueue. The operation queue has the maxConcurrentOperationCount set to 1, so that the NSOperations run one after the other.
Now, in the comple...
Ba asked 10/7, 2012 at 12:18
2
Solved
When performing operations that are dependent on each other OperationQueue could be used to assure they are executed in the correct order. However, would it also be possible to assure that operatio...
Churchly asked 7/10, 2016 at 9:22
1
Solved
Overview
There is an asynchronous operation subclass
Added this operation to the queue.
I cancelled this operation before it starts.
Runtime Error / Warning:
SomeOperation went isFinished=YES ...
Overbuild asked 7/1, 2018 at 14:3
2
Solved
I need to know that When does a NSOperationQueue remove an operation from the queue?
I have NSOperationQueue which has list of NSOperation. At which point the NSOperationQueue removes an operation...
Ludmilla asked 3/2, 2014 at 6:49
3
Solved
The new Cloud Kit framework uses NSOperation extensively for it's CRUD. The results of those operations are returned in blocks. For example:
let fetchOperation = CKFetchRecordsOperation(recordIDs:...
Wellington asked 25/6, 2014 at 9:36
3
I've started working with CloudKit and finally started using subclassed NSOperation for most of my async stuff.
How ever, I have two questions.
How can I mark an operation as failed? That is, if...
Zeal asked 10/9, 2015 at 8:0
1 Next >
© 2022 - 2025 — McMap. All rights reserved.