-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: document vm module limitation with timeouts and async code #8037
Conversation
Hmm, is this accurate? I put the code snippet in a file and ran it (in It fails as documented here if used in the REPL though. |
It fails consistently in the REPL... and, ugh, you're right that it appears to work as expected within a file. Sigh... |
c133999
to
83c7a88
Compare
If you skip the part outside of Promise, it will never stop though (as expected).
|
There is a known limitation when using Promises with the `vm` methods that | ||
allow for `timeout` option. Specifically: the `timeout` is only effective on | ||
code run *within* the VM context; Promises, and other kinds of asynchronous | ||
operations that execute outside of that scope are not limited by the callback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... are not limited by the timeout
That's right. I suggest you just change the example to what @23doors wrote. |
It's unfortunate that it wasn't merged, it would have saved me a few hours! |
Checklist
Affected core subsystem(s)
doc (vm)
Description of change
Fixes: #3020