https://knaidu.gitbooks.io/problem-solving/parallel_processing/implement_asynchronous_callbacks.html
https://www.geeksforgeeks.org/asynchronous-synchronous-callbacks-java/
Asynchronous Callback
Synchronous Callback
https://www.geeksforgeeks.org/asynchronous-synchronous-callbacks-java/
Synchronous Callback : Any process having multiple tasks where the tasks must be executed in sequence and doesn’t occupy much time should use synchronous Callbacks.
For example : You’re in a movie queue for ticket you can’t get one until everyone in front of you gets one.
For example : You’re in a movie queue for ticket you can’t get one until everyone in front of you gets one.
Asynchronous Callback : When the tasks are not dependent on each other and may take some time for execution we should use Asynchronous callbacks.
For example : When you order your food other people can also order their food in the restaurant. They don’t have to wait for your order to finish, If you’re downloading a song from internet, Getting an API response.
For example : When you order your food other people can also order their food in the restaurant. They don’t have to wait for your order to finish, If you’re downloading a song from internet, Getting an API response.