• 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: Kyle Sluder <email@hidden>
  • Date: Thu, 03 Oct 2013 18:49:09 -0700

> On Oct 3, 2013, at 6:22 PM, Charles Srstka <email@hidden> wrote:
>
> The problem I see with queue arguments is that there are two types of queues that people might be using — dispatch_queue_t and NSOperationQueue — and there doesn't seem to be a way to convert one into the other. So if you design your API to take an NSOperationQueue argument and your caller is using dispatch queues, or vice-versa, then your caller is up a creek, unless you go to the trouble to create two versions of each API, one for each type of queue.

It has been implied to me that the implementation of NSOperationQueue is less than stellar, and you might do best to avoid it whenever possible.

For what it’s worth, if you break inside of a block running within an NSOperationQueue, you will always find yourself running on a global async queue. This might be an artifact of an NSOpQ’s internal dispatch queue targeting the main async queue, or it may be a sign that NSOpQ does not maintain a 1:1 mapping with a dispatch queue.

--Kyle Sluder
_______________________________________________

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: Kyle Sluder <email@hidden>)
 >Re: Can I create a thread with a runloop and a dispatch queue? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Can I create a thread with a runloop and a dispatch queue?
  • Next by Date: Re: How to get a "Normal" button in iOS 7/IB / One Solution
  • 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