最佳答案
Node.js issue #66: deprecate domains :
The problem isn't the user experience of domains, as you say the API is simple and users are generally happy with it, but the consequences domains have in maintenance and complications for the node.js core code – that seemingly simple API impacts all of the code base in a too negative way.
Domains in its current form must go. That's certain. What the alternative is, no one knows.
I don't get how we can deprecate something that covers a use case that cannot be covered otherwise, without providing clear (and ready) alternatives.
如果我们反过来说。我们知道域名必须离开,并且 很快就必须在某个时候删除。你喜欢那里吗 没有任何迹象?
链接的问题还提到(缺乏)替代方案。
关于javascript - 为什么 Node.js 中不推荐使用域 API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33552400/