Skip to content

nodejs

source

timer.js

https://github.com/nodejs/node/blob/main/lib/internal/timers.js

感想:哪怕是一个「很简单」的「延迟」执行,背后都要包括算法在内的诸多考量,真的很不容易阿。这才能造就一个成熟的工具吧。

shell

npm config list

# 更换源
npm config set registry https://registry.npm.taobao.org

solutions

node.js - How to prevent the NodeJS event loop from exiting? - Stack Overflow: https://stackoverflow.com/questions/39082527/how-to-prevent-the-nodejs-event-loop-from-exiting