• 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: Killing a stuck NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Killing a stuck NSThread (From: Dustin Wenz <email@hidden>)
 >Re: Killing a stuck NSThread (From: Axel Andersson <email@hidden>)
 >Re: Killing a stuck NSThread (From: Ivan Kourtev <email@hidden>)
 >Re: Killing a stuck NSThread (From: Paul Forgey <email@hidden>)
 >Re: Killing a stuck NSThread (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Bindings in sheet window not working (was: Tables showing different kinds of core data entities)
  • Next by Date: temporarily disabling undo
  • Previous by thread: Re: Killing a stuck NSThread
  • Next by thread: Re: Killing a stuck NSThread
  • Index(es):
    • Date
    • Thread