I don't know why we need both WorkQueue::concurrentApply() and ParallelJobs::execute(), which seems to do the same thing. For Cocoa at least, both do: dispatch_apply(iterations, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ...)
My preference is to remove ParallelJobs and keep WorkQueue::concurrentApply().
Sam says: > > Source/WebCore/platform/graphics/filters/FEMorphology.cpp:195 > > ParallelJobs<PlatformApplyParameters> parallelJobs(&WebCore::FEMorphology::platformApplyWorker, optimalThreadNumber); > > No strictly related to this patch, but I checked what we were using for > ParallelJobs, saw that ParallelJobsLibdispatch (which I assume we are using) > uses dispatch_apply with a global queue. I believe using DISPATCH_APPLY_AUTO > for the queue will work better. so that's worth testing.