@TwinTails - I’ve read the MeteorHacks article.
@SkinnyGeek1010 - I’ve watched the free EventedMind videos too.
I get the fact that Fibers allows us to write asynchronous code in a synchronous manner. I still don’t get how
this.unblock() works, or this line of the docs:
In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node.
this.unblock - 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.
If I still haven’t been clear enough, what happens when this.unblock is called and there’s a long computation after it. Can another request be dealt with at this time? Or would this.unblock only help methods that make an I/O request, and then as in regular Node.js, another request is dealt with while the I/O is happening?