【发布时间】:2015-09-03 00:48:36
【问题描述】:
this.unblock 在 Meteor 中如何工作?
文档说:
Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.
On the server, methods from a given client run one at a time. The N+1th invocation from a client won't start until the Nth invocation returns. However, you can change this by calling this.unblock. This will allow the N+1th invocation to start running in a new fiber.
如果 Node 在单线程中运行,新代码如何开始在新纤程中运行?是不是只有在我们收到 I/O 请求时才会解除阻塞,但如果我们运行长时间的计算就不会发生解除阻塞?
【问题讨论】:
标签: meteor