Why does my BlockOperation continue after I add it to an OperationQueue?

Apple documentation says that Operations run synchronously. Why then does the code continue to run after an operation is added to a queue?

Here is my code:

let op = BlockOperation(block: { print("Done") })
                        
let qu = OperationQueue()
                        
qu.addOperation(op)

print("after!")

Here is the debug results:

after!

Done



Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept