MCPcopy Index your code
hub / github.com/nodejs/node / init

Function init

lib/internal/async_local_storage/async_hooks.js:27–33  ·  view source on GitHub ↗
(asyncId, type, triggerAsyncId, resource)

Source from the content-addressed store, hash-verified

25const storageList = [];
26const storageHook = createHook({
27 init(asyncId, type, triggerAsyncId, resource) {
28 const currentResource = executionAsyncResource();
29 // Value of currentResource is always a non null object
30 for (let i = 0; i < storageList.length; ++i) {
31 storageList[i]._propagate(resource, currentResource, type);
32 }
33 },
34});
35
36class AsyncLocalStorage {

Callers

nothing calls this directly

Calls 2

executionAsyncResourceFunction · 0.85
_propagateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…