Re: Killing a stuck NSThread
Re: Killing a stuck NSThread
- Subject: Re: Killing a stuck NSThread
- From: Paul Forgey <email@hidden>
- Date: Wed, 26 Apr 2006 14:31:41 -0700
I stand corrected.. I've been doing a bunch of DO stuff so that class
got stuck in my head.
My point is using a thread for the sole purpose of timing out network
events is usually not what you want to do for a variety of reasons,
and especially not what you want in an event driven application.
On Apr 26, 2006, at 2:24 PM, Douglas Davidson wrote:
CFSocket is the low-level abstraction for using a socket as a run
loop source; NSSocketPort is something different (an NSPort
subclass implemented using CFSocket). Higher-level approaches
include CFStream, NSURLConnection, etc.
If you do use your own separate networking thread and block in
select, you can create an extra local socket (say, via socketpair)
and add it to your select set; then your other threads can use that
socket to tell the networking thread to wake up and respond, e.g.
to a cancellation state.
Douglas Davidson
_______________________________________________
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