Skip to main content

Usage in Deno

import * as mod from "node:async_hooks";

We strongly discourage the use of the async_hooks API. Other APIs that can cover most of its use cases include:

The node:async_hooks module provides an API to track asynchronous resources. It can be accessed using:

import async_hooks from 'node:async_hooks';

Classes

c
AsyncLocalStorage

This class creates stores that stay coherent through asynchronous operations.

Functions

f
createHook
No documentation available
    f
    executionAsyncId
    No documentation available
      f
      executionAsyncResource

      Resource objects returned by executionAsyncResource() are most often internal Node.js handle objects with undocumented APIs. Using any functions or properties on the object is likely to crash your application and should be avoided.

        f
        triggerAsyncId

        Promise contexts may not get valid triggerAsyncIds by default. See the section on promise execution tracking.

          Interfaces

          Back to top