Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
435 views

I am using Xcode 16.2. I have the below Operation: import Foundation import UIKit typealias ParsingCompletionHandler = ((ParsedRecord) -> ()) class RecordParseOperation: Operation {//THIS GIVES ...
sudoExclamationExclamation's user avatar
0 votes
1 answer
1k views

I encountered a problem with non-iOS developer while describing the flow of OperationQueue. We already know that with OperationQueue we can start as many threads as we want to execute the tasks in ...
Vin's user avatar
  • 454
0 votes
1 answer
775 views

I have implemented an Operation on an OperationQueue. override func main() { super.main() if isCancelled { return } if member.memberType == .timed { triggerRestEvent(...
bobby123uk's user avatar
  • 1,170
0 votes
2 answers
1k views

I'm trying to create a simple ImageDownloader framework in swift. What I'd like to achieve: Able to download images with given URLs Cache with url string So fetching just one image is no problem, I ...
RobotX's user avatar
  • 246
12 votes
1 answer
7k views

Using Swift's new async/await functionality, I want to emulate the scheduling behavior of a serial queue (similar to how one might use a DispatchQueue or OperationQueue in the past). Simplifying my ...
bplattenburg's user avatar
14 votes
1 answer
5k views

I’m currently migrating my app to use the concurrency model in Swift. I want to serialize Tasks to make sure they are executed one after the other (no paralellism). In my use case, I want to listen to ...
alpennec's user avatar
  • 2,194
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 ...
Patroclus's user avatar
  • 1,262
1 vote
1 answer
127 views

Approach 1: - let fetchedImageArray = [Images]() let requestQueue = OperationQueue() func fetchProductImage() { let completionBlock = BlockOperation { [weak self] in ...
Himanshu's user avatar
0 votes
3 answers
1k views

I have some operations that need to run synchronously. I tried to follow this link but it's not clear enough for my situation. op2 doesn't start until op1 is finished and op3 doesn't start until op2 ...
Lance Samaria's user avatar
0 votes
1 answer
144 views

For the last few weeks I have been trying to solve a crash which manifested itself seemingly at random. I believe it coincides with a build being created with xcode 12.4 from 12.3. My sync operation ...
Matt Jenje's user avatar
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 ...
Tuly's user avatar
  • 11
1 vote
0 answers
1k views

I am trying to understand OperationQueue's and its advantages over the DispatchQueue. So when I learn dependencies between Operations I think I can use over the DispatchGroups but I am still trying to ...
eemmrrkk's user avatar
  • 1,709
1 vote
2 answers
365 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 ...
Motti Shneor's user avatar
  • 2,214
2 votes
1 answer
132 views

SwiftySandboxFileAccess works the first time the user approves the NSOpenPanel selection, but the next time the app opens, the security bookmark doesn't have access even though SwiftySandboxFileAccess ...
Mikeumus's user avatar
  • 3,964
-1 votes
1 answer
379 views

I'm trying to write my first Swift command line tool. The tool creates a network request and I want to print the progress of the request using URLSessionTaskDelegate. The basic URL request code is ...
Tyler's user avatar
  • 899
0 votes
2 answers
927 views

I have a collection of tasks which operate asynchronously and have inter dependencies. Right now all this is managed with custom code and I would like to use an OperationQueue instead. However, timing ...
Michael Ozeryansky's user avatar
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 ...
Ankita's user avatar
  • 1
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(...
user3069232's user avatar
  • 8,985
1 vote
1 answer
186 views

override func viewDidLoad() { super.viewDidLoad() worktask = DispatchWorkItem { for i in 1…4 { sleep(2) ...
hadoxi's user avatar
  • 25
2 votes
2 answers
2k views

I am trying to do the following approach, let operationQueue = OperationQueue() operationQueue.maxConcurrentOperationCount = 10 func registerUser(completionHandler: @escaping (Result<Data, Error&...
Perseus's user avatar
  • 1,588
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 ...
NøBi Mac's user avatar
  • 525
2 votes
2 answers
1k views

This documentation says that operations is deprecated with no hint of a replacement function: https://developer.apple.com/documentation/foundation/nsoperationqueue/1415168-operations?language=objc ...
Trygve's user avatar
  • 1,435
4 votes
1 answer
1k views

I have play and pause button. When I pressed play button, I want to play async talking inside for loop. I used dispatch group for async method's waiting inside for loop. But I cannot achieve pause. ...
sametbilgi's user avatar
0 votes
1 answer
561 views

I'd like to know whether my operation was cancelled or finished normally. Here is my code snippet : class PacketReceiver { private let m_executer = OperationQueue() private var m_operation : ...
Dmitry's user avatar
  • 2,230
1 vote
3 answers
3k views

I have a couple of operations to perform on the IoT device from iOS App. So All my operations are in OperationsQueue with serial operations. Here I want to perform one operation at a time and each ...
srinadh's user avatar
  • 123

1
2 3 4 5
21