• 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: Can I create a thread with a runloop and a dispatch queue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I create a thread with a runloop and a dispatch queue?


  • Subject: Re: Can I create a thread with a runloop and a dispatch queue?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 03 Oct 2013 14:40:28 -0700

On Oct 3, 2013, at 2:04 PM, Ken Thomases <email@hidden> wrote:

> Well, you've gone from requesting the ability to assign a queue to a run loop to assuming that all run loops would have queues.

You’re right. I think I was implicitly imagining it would be like [NSRunLoop currentRunLoop] in that it would create one the first time it was asked.

> And your code already dispatches to the calling thread's run loop, right?  Why not, if dispatch_get_current_queue() returns NULL, fall back to the current approach of targeting the run loop?

I have a vague memory of trying this some time ago and running into trouble; but of course I don’t remember exactly what went wrong.
But in light of Mike’s explanation of target queues and “it’s dispatch queues all the way down”, I can see why getting the current queue isn’t a good approach. :/

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Kyle Sluder <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Ken Thomases <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Jens Alfke <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Kyle Sluder <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Jens Alfke <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Kyle Sluder <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Jens Alfke <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Ken Thomases <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Jens Alfke <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: How to get a "Normal" button in iOS 7/IB
  • Next by Date: Wrapping Content of a UIScrollView
  • Previous by thread: Re: Can I create a thread with a runloop and a dispatch queue?
  • Next by thread: Re: Can I create a thread with a runloop and a dispatch queue?
  • Index(es):
    • Date
    • Thread