Skip to content

Asyncwrap more

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild 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 the nextTickQueue and MicrotaskQueue 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 and final callbacks that notify user if an exception was thrown and was caught by a domain or 'uncaughtException' handler. If this is true for post then its final 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

CI: https://ci.nodejs.org/job/node-test-pull-request/1946/

Merge request reports

Loading