Does synchronous mean that by definition it is run on and called from separate threads, or does it have to be that way because of the way things are?

Does an operation that is synchronous have to be run on a separate thread? I think so, otherwise it would deadlock right from the beginning, if it’s run on and called from the main thread. What about if it’s run on and called from a thread other than the main thread? Will it deadlock?

This question arose when I was reading the following content at

Documentation/Foundation/Task Management/Operation

Asynchronous Versus Synchronous Operations

When you add an operation to an operation queue, the queue ignores the value of the isAsynchronous property and always calls the start() method from a separate thread. Therefore, if you always run operations by adding them to an operation queue, there is no reason to make them asynchronous.

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

Does synchronous mean that by definition it is run on and called from separate threads, or does it have to be that way because of the way things are?
 
 
Q