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
sage -From: phaus...@apple.comTo: Mamatha Busi/India/IBM@IBMINCc: swift-corelibs-dev <swift-corelibs-dev@swift.org> Subject: Re: [swift-corelibs-dev] Setting property "maxConcurrentOperationCount = 1" of N

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
dev@swift.org> To: Mamatha Busi <mamab...@in.ibm.com> Cc: 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

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

[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)