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

Function init

lib/internal/trace_events_async_hooks.js:44–54  ·  view source on GitHub ↗
(asyncId, type, triggerAsyncId, resource)

Source from the content-addressed store, hash-verified

42
43 const hook = async_hooks.createHook({
44 init(asyncId, type, triggerAsyncId, resource) {
45 if (nativeProviders.has(type)) return;
46
47 typeMemory.set(asyncId, type);
48 trace(kBeforeEvent, kTraceEventCategory,
49 type, asyncId,
50 {
51 triggerAsyncId,
52 executionAsyncId: async_hooks.executionAsyncId(),
53 });
54 },
55
56 before(asyncId) {
57 const type = typeMemory.get(asyncId);

Callers

nothing calls this directly

Calls 3

traceFunction · 0.85
hasMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…