Get Updates By E-mail 

Article Written By:
Johann Dowa

Easier Threading With NSOperation For Better Performance

  •  
  •  
  •  
  •  
  •  

Creating multi-threaded programs is one of the more complex issues for newer programmers.  When looking through the app store you can see many apps that freeze or jitter because the developers try to do everything in a single thread.

There is a Cocoa Touch class called NSOperation which makes this much simpler.

A new tutorial has been created called Turbo Charging Your Apps With NSOperation which illustrates some of the details of using the NSOperation classes and provides some iPhone sample code.

Probably the simplest tutorial on this topic is NSOperation and NSQueue, and while the demo runs on Mac, and not iPhone,  the tutorial illustrates the principles of NSOperation in a very straightforward manner.

NSOperation is a much easier, higher level method for multi-threading your applications, and while you won’t avoid most of the usual problems that occur from creating threaded applications it is usually much easier to implement an NSOperation than a pthread or NSThread.

[Source: iCodeBlog, Cocoa Is My Girlfriend]


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments