Skip to content

async-hooks: introduce async-storage API

This introduces a new API in core to provide asynchronous storage features.

More and more Node.js users have been needing such API to:

  • build monitoring tools
  • build features that enhence code readability and reduce the need of passing HTTP request objects all the way to one single method that needs it (for instance, a logger).

Some userland modules exist but they:

  • sometimes badly interact with each other
  • introduce potential easy mistakes in usage (need to be required first)
  • might need some specific addons to handle part of the ecosystem properly

Havin such API in core will make the ecosystem more stable and reliable when needing an asynchronous storage.

This is still an early work and there is probably a lot of updates to do to this PR :)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading