Processing multiple objects w/NSTasks efficiently?
Processing multiple objects w/NSTasks efficiently?
- Subject: Processing multiple objects w/NSTasks efficiently?
- From: Michael Carter <email@hidden>
- Date: Mon, 7 Nov 2005 16:01:34 -0800
Hello all.
I could use some advise on a project I'm working on.
I need to query information from a couple hundred servers in an
efficient manner using a central application. My initial approach is
to create an array of objects which each contain an NSTask. This task
pulls information from a remote host using an ssh call in order to
display key info in an NSTableView. The columns of the tableview are
bound to the parameters needing display.
What I'd like to do is write the app so that this is all done
asynchronously so that the user needn't sit there and watch the ball
spin. What would be the best practice for such an approach? I've
tried creating a single thread that iterates the objects and tells
them to start their tasks. I currently use
makeObjectsPerformSelector: but only one server at a time is polled.
The whole operation isn't really asynchronous since I found I had to
use NSTask's waitUntilExit to process each task.
Is there a better way to do this?
Thanks in advance for any input.
#mikec
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden