• 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: Limiting GCD concurrent queues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limiting GCD concurrent queues


  • Subject: Re: Limiting GCD concurrent queues
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 08 May 2015 15:19:09 -0500

On May 8, 2015, at 1:51 PM, Carl Hoefs <email@hidden> wrote:

> I need to limit a GCD concurrent queue to a specific number of concurrently executing tasks (less than the number of cores available).

> I was hoping an API like the following might be lurking around somewhere:
>
>    gcdConcQueue = dispatch_queue_create("GCDConcQueue", DISPATCH_QUEUE_CONCURRENT, 16);
>
> in which the queue manages itself behind the scenes.

> Would this make sense as an API enhancement?

Anything you think would be useful makes sense for an enhancement request.  Whether Apple finds it worth doing is a different question.

> Am I overlooking something obvious?

You should use an NSOperationQueue.  You can set its maxConcurrentOperationCount.  You can add blocks to it using -addOperationWithBlock: or by instantiating NSBlockOperation objects and adding those with -addOperation:.

Regards,
Ken


_______________________________________________

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


  • Follow-Ups:
    • Re: Limiting GCD concurrent queues
      • From: Graham Cox <email@hidden>
    • Re: Limiting GCD concurrent queues
      • From: Carl Hoefs <email@hidden>
References: 
 >Limiting GCD concurrent queues (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Rotate a standard Cocoa control?
  • Next by Date: Re: Limiting GCD concurrent queues
  • Previous by thread: Limiting GCD concurrent queues
  • Next by thread: Re: Limiting GCD concurrent queues
  • Index(es):
    • Date
    • Thread