Async Programming
Async programming is a programming paradigm that allows code to execute asynchronously, i.e., without blocking the execution of the program while waiting for some I/O or other resource to become available.
Synchronous way
Traditionally, programs are written in a synchronous way, where one task is performed at a time and the program waits for the completion of each task before moving on to the next one.
This can result in long wait times if a task is waiting for a resource that takes a long time to become available, such as network I/O or disk I/O.
Asynchronous way
In contrast, async programming uses non-blocking I/O and other asynchronous techniques to allow multiple tasks to be performed concurrently, without blocking the execution of the program.
This means that other tasks can continue to execute while the program is waiting for a resource to become available, leading to more efficient use of system resources and faster program execution.