Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-09 Thread Mamatha Busi via swift-corelibs-dev
Cc: swift-corelibs-dev <swift-corelibs-dev@swift.org> Subject: Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.Date: Thu, May 5, 2016 10:54 PM

Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-06 Thread David P Grove via swift-corelibs-dev
: swift-corelibs-dev@swift.org Date: 05/06/2016 09:43 AM Subject:Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation. Sent by:swift-corelib

Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-06 Thread Philippe Hausler via swift-corelibs-dev
ibs-dev > Subject: Re: [swift-corelibs-dev] Setting property > "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations > using OpenSource Foundation. > Date: Thu, May 5, 2016 10:54 PM > > Hmm that seems unfortunate. I wonder if the serial creation is due to an

Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-06 Thread Mamatha Busi via swift-corelibs-dev
  @ Philippe: Your right. Converting the 'attr' to an optional did do the job of creating a serial queue successfully. Thanks for that. I will create a PR for this.   But this makes me think as to why until now, this was not caught by the compiler itself?   Regards Mamatha   - Original message

Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-05 Thread Philippe Hausler via swift-corelibs-dev
Hmm that seems unfortunate. I wonder if the serial creation is due to an unwrapped optional? var attr: dispatch_queue_attr_t? instead might do the trick… or alternatively we could just let the underlying queue be concurrent all the time and enforce the max ops via making the semaphore always in

[swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of NSOperation fails to execute operations using OpenSource Foundation.

2016-05-05 Thread Mamatha Busi via swift-corelibs-dev
Hello   Code snippet: ———      let operation1 : NSBlockOperation = NSBlockOperation (block: {             sleep(1)             print("Opertion1")         })         let operation2 : NSBlockOperation = NSBlockOperation (block: {             sleep(1)             print("Opertion2”)