like below fixes the issue The purpose of the main queue is to provide a method for scheduling asynchronous work on the main thread. If the queue was concurrent, not all work would be done on the main thread, and that would make the queue useless.
I wish this help you It doesn't matter whether it's the main queue or not. Whatever queue is used to call objectAtIndex: will block on the dispatch_sync call until it completes. If you call this code on the main queue, it blocks like any other queue. During that time, no user events will be processed. The UI will appear locked during that time. When done, the UI will again work as normal.
How does a serial queue/private dispatch queue know when a task is complete?
this one helps. The serialisation of work on a serial dispatch queue is at the unit of work that is directly submitted to the queue. Once execution reaches the end of the submitted closure (or it returns) then the next unit of work on the queue can be executed. Importantly, any other asynchronous tasks that may have been started by the closure may still be running (or may not have even started running yet), but they are not considered.
Any of those help There's no such thing as a "serial dispatch group". Serial/concurrent is a property of a queue, not of a group. Given that AVAssetExportSession is, itself, an asynchronous process, simple attempts to add it to a serial queue will not work. Two approaches seem logical. You can either:
dispatch sync vs dispatch async in main queue ios related query
This might help you When you, a queue, say DispatchQueue.main.sync or DispatchQueue.main.async, that does not affect how the main queue behaves; it affects how you behave, ie whether you wait before doing what comes after the call. But you have nothing after the call so there is no distinction to draw. Your “test” does not test anything.