Difference between dispatching to a queue with `sync` and using a work item with a `.wait` flag?
<p>I'm learning about Apple's GCD, and watching the video <a href="https://developer.apple.com/videos/play/wwdc2016/720/" rel="noreferrer">Concurrent Programming With GCD in Swift 3</a>.</p>

<p>At 16:00 in this video, a flag for <code>DispatchWorkItem</code> is described called <code>.wait</code>, and the functionality and diagram both show exactly what I thought <code>myQueue.sync(execute:)</code> was for.</p>

<p><a href="https://i.stack.imgur.com/eQzxH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eQzxH.png" alt=".wait diagram"></a></p>

<p>So, my question is; what is the difference between:</p>

<pre><code>myQueue.sync { sleep(1); print("sync") }
</code></pre>

<p>And:</p>

<pre><code>myQueue.async(flags: .wait) { sleep(1); print("wait") }
// NOTE: This syntax doesn't compile, I'm not sure where the `.wait` flag moved to.
// `.wait` Seems not to be in the DispatchWorkItemFlags enum.
</code></pre>

<p>Seems like both approaches block the current thread while they wait for the named queue to:</p>

<ol>
<li>Finish any current or prior work (if serial)</li>
<li>Complete the given block/work item</li>
</ol>

<p>My understanding of this must be off somewhere, what am I missing?</p>