[Solved] Asynchronous and synchronous


Synchronous means that the code that initiates the synchronous requests waits and blocks until the request completes. The calling and the called code are “in sync”. Asynchronous means the code that initiates the request continues immediately and the asynchronous call will complete sometime later. The calling and the called code are “not in sync” or asynchronous.

As such, if your code fires a synchronous request, it waits until that request is completed. Nothing else will happen in the meantime, so the asynchronous request won’t be triggered until the synchronous one completes.

If you fire the asynchronous request first and the synchronous one afterwards, it’s not necessarily clear which code will finish/execute first, since the asynchronous request may finish at any time.

solved Asynchronous and synchronous