Node.js v18.12.1 documentation


Table of contents

Async hooks异步挂钩#

Stability: 1 - Experimental实验性的

Source Code: lib/async_hooks.js

The node:async_hooks module provides an API to track asynchronous resources. node:async_hooks模块提供了跟踪异步资源的API。It can be accessed using:可通过以下方式访问:

import async_hooks from 'node:async_hooks';const async_hooks = require('node:async_hooks');