易于理解的“异步事件”定义?

阅读时长 3 分钟读完

jasonbogd提出了一个问题:Easy to understand definition of “asynchronous event”?,或许与您遇到的问题类似。

回答者Denis Hoctorepascarello给出了该问题的处理方式:

Non programming example:

Synchronous You want a pizza for dinner and you are out of the frozen kind. So you have to stop playing WOW which upsets your clan. You go to the kitchen, make the dough, cover it with sauce, add the cheese, and smother it your favorite bacon topping. You just spent 20 minutes of your time making the pizza with another 10 minutes in the oven. The timer beeps and you pull the hot pie out. You can sit back down in front of your computer, eat the pizza, and continue with your conquest.

Asynchronous You want a pizza for dinner while playing WOW. You open up a browser window on your 5th monitor. You load up the Pizza website and order your extra cheesy bacon pizza with a side of bacon grease garlic sauce. You go back to your raid and after 20 minutes the door bell rings. You get the pizza. You sit back down in front of your computer, eat the pizza, and continue with your conquest.

So what is the difference? One way you waste 20-30 minutes of precious WOW time, the other way you waste $20 plus tip.

希望本文对你有帮助,欢迎支持JavaScript中文网

来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/14877

纠错
反馈