Something has to drain blocks sent to the main queue.
You can run a Foundation run loop. That should drain the main queue. I believe
it also ensures blocks sent to the main queue always run on the main thread.
Dispatch includes its own lower-level function to pump the main queue:
Hi Geordie,
I am new here and so pardon me if I misunderstood anything.
When you run a program in Swift, it already runs on main thread by default
and then you can all Dispatch async. So for example,
while true { // This while loop will run for infinite on main thread
Dispatch.main.async {} //