• 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
Re: threads or processes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: threads or processes?


  • Subject: Re: threads or processes?
  • From: Andrew Farmer <email@hidden>
  • Date: Sat, 28 Jan 2006 03:32:10 -0800

On 28 Jan 06, at 00:55, Andrew Bush wrote:
Im looking at writing an app that will be required to have a number of connections to a remote server going at once, up to 100-200.

Im wondering whether the best design in mac os x would be to use multiple processes...spawn one process for each server and let them do their thing...or whether I would get better performance by handling with them all in one process.

Use a single process. Cocoa will let you add a socket to a process's runloop, so you don't even have to do anything fancy to wait on input. If that doesn't work, then go with threads. Creating a process for each connection is (1) total overkill and (2) will hit the standard per-user ulimit of 100 processes.
_______________________________________________
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: threads or processes?
      • From: John Stiles <email@hidden>
References: 
 >threads or processes? (From: Andrew Bush <email@hidden>)

  • Prev by Date: Re: Are there any NSUserDefaults keys which aren't valid?
  • Next by Date: Receiving events from the Apple remote?
  • Previous by thread: threads or processes?
  • Next by thread: Re: threads or processes?
  • Index(es):
    • Date
    • Thread