When a normal function is executed, it is executed sequentially. That is, if you have two functions A() and B() and you run them in that order, function B() will only be called when function A() ends its execution.
By contrast, if you have an asynchronous function A() (for example, that performs an I/O operation or other blocking operation), this can be called and while the operation is performed you can perform another function B() (asynchronous or not) in the main context (main thread). Later, the A() function will return its value when the operation is complete and the main thread is available for this.
Attention that synchronous/asynchronous has nothing to do with multi-threading.
I had the impression that this is what was happening, but I couldn’t find anything on the internet about it. Thank you.
– D. Pardal