Code:
DispatchQueue.concurrentPerform(iterations: filters.count) { iteration in
let filterComputed = originalImage.applyFilter(filterNamed: filters[iteration])
syncQueue.sync {
finalFilters.append(filterComputed)
return
}
}
return finalFilters
I have the above code in a static function which when complete returns the finalFilters array.
Is there a way where this array can be returned each time a computed filter is appended to it?