Nov 3, 2018

Asynchronous programming - non-blocking mode of execution

Asynchronous programming provides a non-blocking, event-driven programming model. This programming model leverages the multiple cores in your system to provide parallelization by using multiple CPU cores to execute the tasks, thus increasing the application's throughput. Note that throughput is a measure of the amount of work done in unit time. In this programming paradigm, a unit of work would execute separately from the main application thread and notify the calling thread about its execution state: success, in progress or failure.

In essence, the asynchronous programming model can use the same thread to process multiple requests without any request blocking the thread. For example, there is no point for your application to wait till the logging tasks are over. The call to the logging framework should be made asynchronously, the application can proceed with other tasks concurrently, without having to wait. This is an example of a non-blocking mode of execution.