Get Updates By E-mail 

nsthread

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]


  •  
  •  
  •  
  •  
  •