Re: One thread used per CFSocket?
Re: One thread used per CFSocket?
- Subject: Re: One thread used per CFSocket?
- From: Quinn <email@hidden>
- Date: Tue, 17 Feb 2009 10:09:49 +0000
At 8:49 +0000 14/2/09, Joel Reymont wrote:
From reading the source code, it appears that a separate thread
(CFSocketManager) is used per CFSocket. Is my reading correct?
No, you're not reading the code correctly. The dead giveaway is the following:
static void *__CFSocketManagerThread = NULL;
<http://www.opensource.apple.com/darwinsource/10.4/CF-368/RunLoop.subproj/CFSocket.c>
[This link may require an APSL <http://www.opensource.apple.com/apsl/>
account.]
There's only a single static variable to hold a reference to the
thread, ergo there's only one thread that handles all of the
CFSockets.
If you look at __CFSocketManager in more detail, you'll see it
contains a CFAllocatorReallocate to grow the descriptor sets if
necessary.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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