PDA

View Full Version : Synchronous and asynchronous classes difference



Higgs
16th September 2014, 16:10
I'm reading "Foundation of Qt Development" book and I'm reading this line of text:
"QFtp and QHttp classes are asynchronous"

I know this classes are deprecated but the main reason why I create this thread is to figure out difference between Synchronous and asynchronous classes.

So,what's the difference?

wysota
16th September 2014, 16:32
The wording in the book is maybe not very precise. What it means is that both these classes perform their work in a non-blocking (asynchronous) manner. It means that by executing their functions you only schedule an operation to be performed -- when the function returns the operation is not yet complete. This is opposed to synchronous (blocking) calls, e.g. QFile::read() which block the flow until the operation is complete.

Higgs
16th September 2014, 16:56
Thanks.
This is good simple explanation.