- Mastering Node.js(Second Edition)
- Sandro Pasquali Kevin Faaborg
- 170字
- 2021-07-02 19:28:45
Managing concurrency
Simplifying control flows has been a concern of the Node community since the very beginning of the project. Indeed, this potential criticism was one of the very first anticipated by Ryan Dahl, who discussed it at length during the talk in which he introduced Node to the JavaScript developer community.
Because deferred code execution often requires the nesting of callbacks within callbacks, a Node program can sometimes begin to resemble a sideways pyramid, also known as The Pyramid of Doom. You've seen it: deeply nested code, 4 or 5 or even more levels deep, curly braces everywhere. Apart from syntactical annoyances, you can also imagine that tracking errors across such a call stack might be difficult—if a callback at the third level throws, who is responsible for handling that error? The second level? Even if level 2 is reading a file and level 3 is querying a database? Does that make sense? It can be hard to make sense of asynchronous program flows.
- Mastering Node.js(Second Edition)
- EDA技術與VHDL編程
- 計算機網絡安全實訓教程(第二版)
- PLC、現場總線及工業網絡實用技術速成
- 網絡的琴弦:玩轉IP看監控
- 網絡安全技術與解決方案(修訂版)
- Mastering TypeScript 3
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- 6G新技術 新網絡 新通信
- 網絡安全應急響應技術實戰指南
- 語音信號處理及Blackfin DSP實現
- React Cookbook
- Hands-On Bitcoin Programming with Python
- 網絡空間全球治理觀察
- Intelligent Mobile Projects with TensorFlow