gf3 / sandbox

A nifty JavaScript sandbox for Node.js
ISC License
844 stars 123 forks source link

Async functions in sandbox support? #48

Open 0o-de-lally opened 8 years ago

0o-de-lally commented 8 years ago

I'm looking through the docs on async functions. Are there any configurations which would allow for example setTimeout to work?

I think this would be an issue for Node < 12.0. What Node versions does this library target?

Thanks in advance

yorickvP commented 8 years ago

Looking at the code, it could work fine (within the timeout), except the output is handled immediately after the user code exits, so there won't be any output in your timeout.

zsf3 commented 4 years ago

Any update on this?

yorickvP commented 4 years ago

Adding an await to the runner might work. I don't use this for anything, nor do I have time to make this. Sorry.