• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Processing multiple objects w/NSTasks efficiently?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Processing multiple objects w/NSTasks efficiently?
      • From: John Timmer <email@hidden>
    • Re: Processing multiple objects w/NSTasks efficiently?
      • From: Kaelin Colclasure <email@hidden>
    • Re: Processing multiple objects w/NSTasks efficiently?
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: Re: Data-loss issue when quitting a CoreData-document-based application
  • Next by Date: Re: Preferences in a separate nib file
  • Previous by thread: Re: Core Data
  • Next by thread: Re: Processing multiple objects w/NSTasks efficiently?
  • Index(es):
    • Date
    • Thread