¡@

Home 

2014/10/15 ¤U¤È 10:10:37

iphone Programming Glossary: isconcurrent

How do I do an Asychronous NSURLConnection inside an NSOperation?

http://stackoverflow.com/questions/1304508/how-do-i-do-an-asychronous-nsurlconnection-inside-an-nsoperation

properties to maintain the NSOperation BOOL finished BOOL executing void downloadAndParse NSURL url void start BOOL isConcurrent BOOL isFinished BOOL isExecuting @property BOOL done @property nonatomic retain NSURLConnection ebirdConnection The autorelease.. as finished. self willChangeValueForKey @ isFinished finished YES self didChangeValueForKey @ isFinished BOOL isConcurrent return YES BOOL isExecuting return executing BOOL isFinished return finished void downloadAndParse NSURL url self.downloadAndParsePool..

Subclassing NSOperation to be concurrent and cancellable

http://stackoverflow.com/questions/3859631/subclassing-nsoperation-to-be-concurrent-and-cancellable

code @synthesize isExecuting _isExecuting @synthesize isFinished _isFinished @synthesize isCancelled _isCancelled BOOL isConcurrent return YES void start WHY SHOULD I PUT THIS if NSThread isMainThread self performSelectorOnMainThread @selector start withObject.. what you're doing. In that case your MyOperation will always be run on a background thread regardless of what the BOOL isConcurrent method returns since NSOperationQueue s are explicitly designed to run operations in the background. As such you generally.. the main method. It's that easy. A note technically this is not a concurrent NSOperation in the sense that MyOperation isConcurrent would return NO as implemented above. However it will be run on a background thread. The isConcurrent method really should..