This may sound like noobish question but I have tried researching these two classes and I am not 100% sure what their differences and specific purposes are. Also, is there some way I can retrieve a list of all the currently running processes much like Task Manager on windows? I was thinking some static function would be able to return an array of NSThreads or NSTasks… or I may just be going about this completely wrong xD
Thanks in advance for any help!
Thom
NSThread is provided to create and manage background threads. You don’t hear much about it today because libraries like Grand Central Dispatch GCD and NSOperationQueue have been added by Apple recently for those purposes and offer ease of use.
NSTask is kind of like a wrapper for the C system command. It is only available on Mac OSX environments (not IOS) and is used to launch operating system commands – commands typically used from the command line. For example, awhile back, I took some handy bash utilities that I had developed for managing Xerox printers and put a Cocoa front end on them by using Cocoa for the graphical interface and using NSTask to launch the command lines. NSTask can be mapped to the input and output of those unix commands, so you can send them stuff on stdin and get stuff back on sdout
hope that helps to clear it up