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

Function executionAsyncResource

lib/internal/async_hooks.js:143–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141const topLevelResource = {};
142
143function executionAsyncResource() {
144 // Indicate to the native layer that this function is likely to be used,
145 // in which case it will inform JS about the current async resource via
146 // the trampoline above.
147 async_hook_fields[kUsesExecutionAsyncResource] = 1;
148
149 const index = async_hook_fields[kStackLength] - 1;
150 if (index === -1) return topLevelResource;
151 const resource = execution_async_resources[index] ||
152 executionAsyncResource_(index);
153 return lookupPublicResource(resource);
154}
155
156function inspectExceptionValue(e) {
157 inspect ??= require('internal/util/inspect').inspect;

Callers 15

initFunction · 0.85
enterWithMethod · 0.85
runMethod · 0.85
getStoreMethod · 0.85
getCLSFunction · 0.85
setCLSFunction · 0.85
initFunction · 0.85
initFunction · 0.85
handlerFunction · 0.85
initFunction · 0.85

Calls 1

lookupPublicResourceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…