On May 8, 2015, at 1:51 PM, Carl Hoefs <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to