• 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: How do I use NSStream with dispatch queues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I use NSStream with dispatch queues?


  • Subject: Re: How do I use NSStream with dispatch queues?
  • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Tue, 20 Mar 2012 10:41:45 +0000

On 20 Mar 2012, at 02:55, Mark Pauley wrote:

> Jens: you'll have to find some way to bridge your gcd queues back to the runloop on which the protocol is invoked.  I would recommend using a CFRunLoopSource that you message, using a queue as the method of message passing from your gcd code.

Don't forget CFRunLoopPerformBlock.  I only say this because, *shrug*, I always forget it )-:

Ultimately you're going to have to have a thread on which to schedule your run loop sources.  You can either use the main thread, with all of its potential pitfalls, or create your own thread; there is no other thread you can reliably piggyback on.  Once you've accepted the inevitability of using your own thread, it's just a question of how best to manage that thread.  CFRunLoopPerformBlock is a good weapon in that war IMO.

Share and Enjoy
--
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

References: 
 >How do I use NSStream with dispatch queues? (From: Jens Alfke <email@hidden>)
 >Re: How do I use NSStream with dispatch queues? (From: Raffi Khatchadourian <email@hidden>)
 >Re: How do I use NSStream with dispatch queues? (From: Mark Pauley <email@hidden>)

  • Prev by Date: Re: How do I use NSStream with dispatch queues?
  • Next by Date: Re: How do I use NSStream with dispatch queues?
  • Previous by thread: Re: How do I use NSStream with dispatch queues?
  • Next by thread: iOS deadlocks calling queue-based URL connection delegate
  • Index(es):
    • Date
    • Thread