Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-27 Thread Daniel Müllenborn via swift-users
I do not understand why this works, but when you create a queue in the line 
before. It will be used.

Like in this example:

let queue = DispatchQueue.global(qos: .default)
DispatchQueue.concurrentPerform(iterations: n)



> Hmm, I didn’t realize that concurrentPerform doesn’t allow you to pass in 
> your own queue…this looks like an oversight to me. Maybe someone with more 
> experience with libdispatch could explain?
> 
> Saagar Jha
> 
> 
> 
> > On Sep 25, 2016, at 09:13, Gerriet M. 
> > Denkmannwrote:
> > 
> > > On 25 Sep 2016, at 23:08, Saagar 
> > > Jhawrote:
> > > 
> > > You might be looking for the DispatchQoS.QoSClass enum.
> > > 
> > > Saagar Jha
> > 
> > Probably. But how to make concurrentPerform use any of these enums?
> > 
> > Gerriet.
> > 
> > 
> > 
> > > 
> > > > On Sep 25, 2016, at 05:19, Gerriet M. Denkmann via 
> > > > swift-userswrote:
> > > > 
> > > > In ObjC:
> > > > 
> > > > dispatch_queue_t queue = dispatch_get_global_queue( 
> > > > DISPATCH_QUEUE_PRIORITY_HIGH, 0 );
> > > > dispatch_apply( nbrThreads, queue, ^void(size_t idx) …
> > > > 
> > > > In Swift 3:
> > > > DispatchQueue.concurrentPerform( iterations: nbrThreads) …
> > > > 
> > > > How can one specify the DISPATCH_QUEUE_PRIORITY or QualityOfService to 
> > > > be used by concurrentPerform?
> > > > 
> > > > Gerriet.
> > > > 
> > > > ___
> > > > swift-users mailing list
> > > > swift-users@swift.org(mailto:swift-users@swift.org)
> > > > https://lists.swift.org/mailman/listinfo/swift-users
> > > 
> > 
> 
> 
> 
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Gerriet M. Denkmann via swift-users

> On 25 Sep 2016, at 23:08, Saagar Jha  wrote:
> 
> You might be looking for the DispatchQoS.QoSClass enum.
> 
> Saagar Jha

Probably. But how to make concurrentPerform use any of these enums?

Gerriet.



> 
>> On Sep 25, 2016, at 05:19, Gerriet M. Denkmann via swift-users 
>>  wrote:
>> 
>> In ObjC:
>> 
>> dispatch_queue_t queue = dispatch_get_global_queue( 
>> DISPATCH_QUEUE_PRIORITY_HIGH, 0 );   
>> dispatch_apply( nbrThreads, queue, ^void(size_t idx) …
>> 
>> In Swift 3:
>> DispatchQueue.concurrentPerform( iterations: nbrThreads) …
>> 
>> How can one specify the DISPATCH_QUEUE_PRIORITY or QualityOfService to be 
>> used by concurrentPerform?
>> 
>> Gerriet.
>> 
>> ___
>> swift-users mailing list
>> swift-users@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-users
> 

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Saagar Jha via swift-users
You might be looking for the DispatchQoS.QoSClass 
 enum.

Saagar Jha



> On Sep 25, 2016, at 05:19, Gerriet M. Denkmann via swift-users 
>  wrote:
> 
> In ObjC:
> 
> dispatch_queue_t queue = dispatch_get_global_queue( 
> DISPATCH_QUEUE_PRIORITY_HIGH, 0 );
> dispatch_apply( nbrThreads, queue, ^void(size_t idx) …
> 
> In Swift 3:
> DispatchQueue.concurrentPerform( iterations: nbrThreads) …
> 
> How can one specify the DISPATCH_QUEUE_PRIORITY or QualityOfService to be 
> used by concurrentPerform?
> 
> Gerriet.
> 
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users