• 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: Grand Central Details
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grand Central Details


  • Subject: Re: Grand Central Details
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 17 Jun 2008 18:40:07 -0700

On Jun 17, 2008, at 6:02 PM, Michael Gardner wrote:
Too bad you can't avoid blocking at least occasionally with the event-driven APIs, meaning you still have to use threads to avoid it completely. And I fail to see what's so bad about having one thread per socket. Is it because Threads Are Hard?

In that case, it is because threads are relatively expensive. Every thread adds a bit of memory use -- not insignificant given each individual thread's stack -- and scheduling overhead. In this model, you'd expect that most threads will be blocked on I/O most of the time, but you might also likely find that performance goes to hell in a handbasket as soon as multiple sockets are lit up with inbound data.


And, yes, threads are hard, though -- in this case -- that hardness is a bit irrelevant in that the real challenge is how to get data *out* of the thread dealing with network I/O and *into* the threads dealing with data.

b.bum

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Road to 80 cores ( Was Re: Grand Central Details)
      • From: "Pierce T. Wetter III" <email@hidden>
    • Re: Grand Central Details
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Grand Central Details (From: "Pierce T. Wetter III" <email@hidden>)
 >Re: Grand Central Details (From: Michael Gardner <email@hidden>)

  • Prev by Date: Where to store document window specific setup data
  • Next by Date: Dot syntax
  • Previous by thread: Re: Grand Central Details
  • Next by thread: Re: Grand Central Details
  • Index(es):
    • Date
    • Thread