I am trying to create an NSOperation by subclassing from NSOperation.I want my operation to be executed on a separate thread as well as it should support canceling option i.e i should be able to stop the thread(or the operation) at any point of time.I tried adding my operation instance to NSOperationQueue,everything is working fine but “the operation” is being executed after some time which makes my application slow.So i tried running my operation alone by calling [theOperation start]; its pretty fast but executing on the main thread.How to make the NSOperation run on separate thread with canceling option please help.
I am trying to create an NSOperation by subclassing from NSOperation.I want my operation
Share
either:
1) do not make it an NSOperation and explicitly create a thread.
2) use a second operation queue and/or increase the priority.
3) use a container type for the result. when you need it immediately, cancel the background load operation and load manually.