Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
804 views

I'm creating an NSOperation that executes a closure with a delay. The operations are added into a queue, every time before a new operation is added I cancel all existing ones in the queue: let myOp = ...
-1 votes
1 answer
655 views

Apple documentation says that Operations run synchronously. Why then does the code continue to run after an operation is added to a queue? Here is my code: let op = BlockOperation(block: { print("...
1 vote
1 answer
488 views

I created an NSOperationQueue and set the maxConcurrentOperationCount property to 2. If I create 2 operations that do not stop, when I continue to add operations to it, the NSOperationQueue will cache ...
1 vote
1 answer
686 views

I have a NSOperationQueue that is concurrent. For a specific NSOperation, if it fails, I want to immediately retry this operation at the highest priority, and suspend all other operations until it ...
1 vote
2 answers
664 views

Our app currently using NSOperation (Operation in Swift) to manage serials of network request and data parsing. Some code are required to be executed after like all 5 operations in a queue are ...
0 votes
0 answers
59 views

I have some operations with different delay times. While using GCD it looks like: dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayTime * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{ ...
0 votes
1 answer
51 views

I am writing a VideoPlayer() class that has a start() and stop() function to initiate playback for a given video. Each instance of VideoPlayer() manages a single video The start() and stop() functions ...
1 vote
2 answers
210 views

I'm trying to create an async subclass of Operation. The code crashes on the getter of the "state" Property. I have found an article which solves the async Subclass, but i'm curios as to why ...
1 vote
2 answers
368 views

I have a chain of many NSBlockOperations with dependencies. If one operation early in the chain fails - I want the other operations to not run. According to docs, this should be easy to do from the ...
1 vote
0 answers
82 views

Do you need to use URLSession's dataTask(with: URL) inside of an Operation class's main() method? For example: class Downloader: Operation { let postDetailsPage: PostDetailsPage init(_ ...
0 votes
1 answer
80 views

I'm trying to explore queuePriority of Operation. I have three Operation objects with queuePriority veryhigh,high and normal. But I'm getting unexpected output, in log I can see Operation objects with ...
2 votes
3 answers
1k views

Swift 5, iOS 13 I am running this code, it works. var body: some View { ... Button(action: { self.animateTLeft() quest = quest + "1" }) { Wedge(startAngle: .init(degrees: 180), endAngle: .init(...
1 vote
0 answers
89 views

I’m trying to observe when a new dependency is being added to an operation: let token = operation.observe(\.dependencies, options: [.old, .new]) { (operation, changes) in print("dependencies ...
1 vote
1 answer
843 views

I am using Rob's implementation of AsynchronousOperation Following is my AsynchronousOperation subclass class AsynOperation : Operation { // Same implementation as mentioned in Rob's ...
5 votes
3 answers
6k views

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 ...

15 30 50 per page
1
2 3 4 5
...
66

AltStyle によって変換されたページ (->オリジナル) /