• 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: Where do asynchronous API do their "work"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where do asynchronous API do their "work"?


  • Subject: Re: Where do asynchronous API do their "work"?
  • From: AgentM <email@hidden>
  • Date: Mon, 14 Nov 2005 11:49:39 -0600

If you look into the open-source component of CFSocket and friends, you will see that indeed CFSocket spawns a thread for itself. This thread (used for all sockets registered with it) blocks on a select() and when when a socket event occurs, the thread sends a mach message to the main thread which calls the respective Objective-C routines.

http://darwinsource.opendarwin.org/10.4/CF-368/RunLoop.subproj/ CFSocket.c

Probably for performance reasons, CFRunLoop doesn't support polling on file descriptors itself with select(). However, I would love to see CFRunLoop use and support kqueues natively since it offers more features and less overhead than select() or poll(). (kqueue available only in >=10.3)

GNUStep's NSRunLoop does support file descriptor polling (a good idea since there is no mach messaging in POSIX) and, AFAIK, there has been no trouble with performance due to this.

|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
AgentM
email@hidden
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-

_______________________________________________
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


References: 
 >Where do asynchronous API do their "work"? (From: Jerry Krinock <email@hidden>)
 >Re: Where do asynchronous API do their "work"? (From: email@hidden)
 >Re: Where do asynchronous API do their "work"? (From: Shawn Erickson <email@hidden>)
 >Re: Where do asynchronous API do their "work"? (From: RenĂ© van Amerongen <email@hidden>)

  • Prev by Date: Re: QTKit: hum, is it a bug?
  • Next by Date: Re: Volunteers to test on 10.2
  • Previous by thread: Re: Where do asynchronous API do their "work"?
  • Next by thread: Re: Where do asynchronous API do their "work"?
  • Index(es):
    • Date
    • Thread