In the 'Discussion' section of the current documentation for Swift's DispatchQueue
, it says:
If the target queue is a concurrent queue, the blocks run in parallel and must therefore be reentrant-safe.
However, unlike dispatch_apply
(on which this API is built), this method provides no direct means of specifying a target queue, so this callout is somewhat more confusing than it ought to be. IMO, it's important to highlight the reentrancy considerations that apply in most (all?) cases, but the implicit reference to the implementation details should be removed or clarified.
Feedback filed as: FB13708750