substack/node-stackedy — Issue #2: How can we know that an execution has finished ?
Author: temsa
Created: 2012-01-20 15:10:11+00:00
State: open

I don't know how to handle this properly, I would like to now when the vm.runInNewContext has finished running, because I can run asynchronous code, so I just get the "result" as soon as the synchronous code has finished, but I do not know when will my asyncrhonous code has finished.

For now I can only use a timeout and use the stopppable property, without knowing if the execution was finished or not... I guess I can do it using a before or after filter, but I do not know how :(