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

Function getOrSetAsyncId

lib/internal/async_hooks.js:430–436  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

428}
429
430function getOrSetAsyncId(object) {
431 if (ObjectPrototypeHasOwnProperty(object, async_id_symbol)) {
432 return object[async_id_symbol];
433 }
434
435 return object[async_id_symbol] = newAsyncId();
436}
437
438
439// Return the triggerAsyncId meant for the constructor calling it. It's up to

Callers 2

connectionListenerFunction · 0.85
trackPromiseFunction · 0.85

Calls 1

newAsyncIdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…