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

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)