Asyncwrap more
Pull Request check-list
-
Does make -j8 test
(UNIX) orvcbuild test nosign
(Windows) pass with this change (including linting)? -
Is the commit message formatted according to CONTRIBUTING.md? -
If this change fixes a bug (or a performance problem), is a regression test (or a benchmark) included?
Affected core subsystem(s)
async_wrap
Description of change
Series of commits that update the AsyncWrap
API in the effort to make it ready for public API. Significant changes are:
- Add
final
callback that runs after thenextTickQueue
andMicrotaskQueue
has been depleted, or if in the process an exception was thrown but was caught by a domain or'uncaughtException'
handler. - Pass second argument to
post
andfinal
callbacks that notify user if an exception was thrown and was caught by a domain or'uncaughtException'
handler. If this is true forpost
then itsfinal
callback will not be called. -
setupHooks()
now accepts an object instead of a series of arguments. - If an async wrap hook throws the process will no longer abort. Instead it will clear all domain and
'uncaughtException'
handlers to forcefully allow the exception to bubble and exit the process.
R=@AndreasMadsen R=@bnoordhuis