I am a bit confused as to why a synchronous call is different to an asynchronous call, as there is never an "immediate" response, it still takes some nano or milliseconds?
A synchronous call returns to its caller after finishing its job (or reaching timeout). An asynchronous call returns immediately after starting some other activity.
This means that, for a synchronous call, the caller waits - is completely blocked - while the called activity happens; an asynchronous call returns almost immediately to the caller although all that's happened is that the activity was started. As a result, after an asynchronous call, the called activity runs in parallel to the calling activity.
There's often some mechanism for the asynchronously started activity to "report back" that it's finished, or the calling activity may poll or otherwise look for evidence of completion of the asynchronous task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With