Swiftify-Corp / Swiftify

43 stars 24 forks source link

GCD queue creation conversion ignores concurrency attribute #241

Closed mjohnson12 closed 1 year ago

mjohnson12 commented 1 year ago

dispatch_queue_create("com.company.concurrentAccessQueue", DISPATCH_QUEUE_CONCURRENT); gets converted to DispatchQueue(label: "com.company.concurrentAccessQueue").

It's missing the concurrency attribute so it creates a serial queue instead.

This was found using the standalone converter version 5.6.1.

alex-swiftify commented 1 year ago

Thanks, @mjohnson12 for reporting!

Just to be completely sure, do you expect the following as the output for your case?

DispatchQueue(label: "com.company.concurrentAccessQueue", attributes: .concurrent)
mjohnson12 commented 1 year ago

Yes

alex-swiftify commented 1 year ago

@mjohnson12 Thanks for confirming. It's fixed as I suggested above. The change will be included in the next Offline Converter update.