• 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: Crash in CFReadStreamOpen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in CFReadStreamOpen


  • Subject: Re: Crash in CFReadStreamOpen
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 28 May 2009 07:35:49 -0700


On May 28, 2009, at 6:49 AM, Benoit Foucher wrote:

It's actually not clear to me how I'm supposed to use run loops if the APIs aren't thread safe or why the different methods to register a source with a run loop provide a run loop parameter.

I'll have to defer to the Apple people here who know about the innards of CFRunLoop.


Suppose I want a thread pool to handle IO for multiple network connections (either using the CFSocket or CFStream APIs). How can I register the network connections with the run loop of each thread from the pool?

If you're using a thread per connection you probably don't need or want async I/O — so skip the runloop stuff and just use the read/write calls in blocking mode.


The usual design when using CFStreams with runloops is to do everything on one thread, and handle asynchronous events as they happen.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Crash in CFReadStreamOpen (From: Benoit Foucher <email@hidden>)
 >Re: Crash in CFReadStreamOpen (From: Jens Alfke <email@hidden>)
 >Re: Crash in CFReadStreamOpen (From: Benoit Foucher <email@hidden>)

  • Prev by Date: Re: Crash in CFReadStreamOpen
  • Next by Date: Re: Crash in CFReadStreamOpen
  • Previous by thread: Re: Crash in CFReadStreamOpen
  • Next by thread: Re: Crash in CFReadStreamOpen
  • Index(es):
    • Date
    • Thread