Add and implement WorkQueue::concurrentApply
https://bugs.webkit.org/show_bug.cgi?id=148488

Reviewed by Geoffrey Garen.

WorkQueue::concurrentApply is modeled after dispatch_apply, and on Cocoa it uses dispatch_apply directly.
For other ports there's a generic concurrentApply implemented using our threading primitives.

* wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::operator->):
* wtf/WorkQueue.cpp:
(WTF::WorkQueue::concurrentApply):
* wtf/WorkQueue.h:
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::concurrentApply):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@188981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed