Closed dalejung closed 11 years ago
When running stuff in Fiber, how do I get access to the function global? I want the ability to auto hoist the variables defined within the function to another scope.
I could run each line within a contextify, actualy I run everything within the context stuff anyways...
So I would need to wrap the actual contextify.run
or vm.runInThisContext
.
Verify that the vm functions will still work within a Fiber
Just verified that the Fiber works within nested runs as well.
Thinking about it, this is done on the inode side.
Want the ability to run blocks of code synchronously.
The basic sync wrappers for functions exist here.
https://github.com/dalejung/inode/blob/master/lib/sync/index.js
Right now it handles async methods that return promises. The
.sync
attribute will call the function and Fiber.run when the promise is resolved.Further issues:
Should the %fun auto run the code with a Fiber?Should each line run within a fiber?