DispatchQueue.concurrentPerform(1000) { i in ... }

dispatch_apply(DISPATCH_APPLY_AUTO, 1000, ^(size_t i) { ... }