-Callbacks especially can be ticky, so lets take a look at another real world example. Let's say you are looking for a new job and you go into an interview. You give them your phone number so that when they make a decision they can call you and you can celebrate if you got the job, or be sad if you didn't. The altertnative if that callback mechanism didn't exist would be to call the company every few minutes to see if they made a decision. This would render you incapable of doing anything else, and your life would be rendered useless untill they make a decision. This type of behavior is refered to as polling, since you are polling the company to ask if they have made a decision. Callbacks in code work in a similar way.
0 commit comments