user1908860
user1908860

Reputation: 519

C++ equivalent for NSOperation and NSOperationQueue

Please advise me to how to achieve NSOperation and NSOperationQueue functionality in C++.

Upvotes: 7

Views: 713

Answers (2)

John K
John K

Reputation: 905

A rough substitute for NSOperation: std::packaged_task.

Upvotes: 1

Alan
Alan

Reputation: 46903

NSOperation is a class for managing non-critical tasks. You create Operations, and place them on the NSOperationQueue and each operation is performed as the app executes.

There is no such "equivalent" in C++. C++ is a language, as NSOperationQueue is part of FoundationKit a part of OSX and iOS, a set of Objective-C objects, that aren't part of the objective-c standard.

What you'll need to research is the Android paradigms for doing task concurrency, and use those. Or you can just manually download the assets from the server, in-lieu of any managed task library.

Upvotes: 2

Related Questions