Re: Does CFSocket use efficient polling?
Re: Does CFSocket use efficient polling?
- Subject: Re: Does CFSocket use efficient polling?
- From: Jens Alfke <email@hidden>
- Date: Tue, 10 Feb 2009 09:45:59 -0800
On Feb 10, 2009, at 9:19 AM, Quinn wrote: Last I checked CFSocket was based on <x-man-page://2/select>. It's a matter of opinion as to whether that's 'efficient'.
I gather it's not as good as kqueue, but it's pretty reasonable.
CFNetwork*'s asynchronous mode creates a single background thread that blocks in a select( ) on all open sockets, and notifies other threads' runloops when data arrives. So the system resources used for polling are pretty much constant however many sockets there are.
—Jens
* and the Foundation networking classes, which are based on CFNetwork |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden