I am getting a failure while creating a GCD queue in Swift, any idea?
var q: dispatch_queue_t? q = dispatch_queue_create("com.kukodajanos.queryPlaces", 0)
By looking at the documentary comments for it using alt + click, you can see:
In attr you can pass 3 things: nil, DISPATCH_QUEUE_SERIAL and DISPATCH_QUEUE_CONCURRENTnot Int.
nil, DISPATCH_QUEUE_SERIAL and DISPATCH_QUEUE_CONCURRENT
Passing nil instead of 0:
var q: dispatch_queue_t? q = dispatch_queue_create("com.kukodajanos.queryPlaces", nil)
, , , nil, 0.
nil
0
, ? , . , , , , , :
let q = dispatch_queue_create("com.kukodajanos.queryPlaces", nil)
Passing zero instead of 0, since dispatch_queue_attr_t shoild does the trick. In addition, the function returns an implicitly expanded optional, rather than optional, what specifically?