Ah right, of course, the code will run DispatchQueue.async
first (but not its block yet), then DispatchQueue.sync
before the async work has started, but the queue is serial, so the sync
will block awaiting the async
work.
So yes, you're right that the order is guaranteed, sorry.