Home
last modified time | relevance | path

Searched refs:asyncId (Results 1 – 25 of 35) sorted by relevance

12

/third_party/node/lib/internal/
Dasync_hooks.js118 function callbackTrampoline(asyncId, resource, cb, ...args) { argument
122 if (asyncId !== 0 && hasHooks(kBefore))
123 emitBeforeNative(asyncId);
126 if (asyncId === 0 && typeof domain_cb === 'function') {
133 if (asyncId !== 0 && hasHooks(kAfter))
134 emitAfterNative(asyncId);
194 function emitInitNative(asyncId, type, triggerAsyncId, resource) { argument
204 asyncId, type, triggerAsyncId,
226 function emitHook(symbol, asyncId) { argument
235 active_hooks.array[i][symbol](asyncId);
[all …]
Dinspector_async_hook.js16 init(asyncId, type, triggerAsyncId, resource) { argument
23 this.promiseIds.add(asyncId);
25 inspector.asyncTaskScheduled(type, asyncId, recurring);
28 before(asyncId) { argument
29 if (this.promiseIds.has(asyncId))
31 inspector.asyncTaskStarted(asyncId);
34 after(asyncId) { argument
35 if (this.promiseIds.has(asyncId))
37 inspector.asyncTaskFinished(asyncId);
40 destroy(asyncId) { argument
[all …]
Dtrace_events_async_hooks.js44 init(asyncId, type, triggerAsyncId, resource) { argument
47 typeMemory.set(asyncId, type);
49 type, asyncId,
56 before(asyncId) { argument
57 const type = typeMemory.get(asyncId);
60 trace(kBeforeEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId);
63 after(asyncId) { argument
64 const type = typeMemory.get(asyncId);
67 trace(kEndEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId);
70 destroy(asyncId) { argument
[all …]
Dtimers.js156 const asyncId = resource[async_id_symbol] = newAsyncId();
160 emitInit(asyncId, type, triggerAsyncId, resource);
458 const asyncId = immediate[async_id_symbol];
459 emitBefore(asyncId, immediate[trigger_async_id_symbol], immediate);
471 emitDestroy(asyncId);
476 emitAfter(asyncId);
533 const asyncId = timer[async_id_symbol];
543 emitDestroy(asyncId);
548 emitBefore(asyncId, timer[trigger_async_id_symbol], timer);
571 emitDestroy(asyncId);
[all …]
/third_party/node/test/async-hooks/
Dtest-async-exec-resource-match.js19 (asyncId, type, triggerId, resource) => {
21 firstSeenAsyncId = asyncId;
23 assert.ok(idResMap.get(asyncId) === undefined);
24 idResMap.set(asyncId, resource);
26 before(asyncId) { argument
27 if (asyncId >= firstSeenAsyncId) {
28 beforeHook(asyncId);
31 after(asyncId) { argument
32 if (asyncId >= firstSeenAsyncId) {
33 afterHook(asyncId);
[all …]
Dtest-async-await.js29 function oninit(asyncId, type) { argument
31 promisesInitState.set(asyncId, 'inited');
35 function onbefore(asyncId) { argument
36 if (!promisesInitState.has(asyncId)) {
39 promisesExecutionState.set(asyncId, 'before');
42 function onafter(asyncId) { argument
43 if (!promisesInitState.has(asyncId)) {
47 assert.strictEqual(promisesExecutionState.get(asyncId), 'before',
50 assert.strictEqual(promisesInitState.get(asyncId), 'resolved',
53 promisesExecutionState.set(asyncId, 'after');
[all …]
Dtest-emit-after-on-destroyed.js26 const asyncId = newAsyncId(); constant
28 emitInit(asyncId, 'event1', triggerId, {});
29 emitBefore(asyncId, triggerId);
30 emitAfter(asyncId);
31 emitDestroy(asyncId);
36 const asyncId = newAsyncId(); constant
38 emitInit(asyncId, 'event2', triggerId, {});
39 emitDestroy(asyncId);
42 emitAfter(asyncId);
Dtest-emit-before-on-destroyed.js26 const asyncId = newAsyncId(); constant
28 emitInit(asyncId, 'event1', triggerId, {});
29 emitBefore(asyncId, triggerId);
30 emitAfter(asyncId);
31 emitDestroy(asyncId);
36 const asyncId = newAsyncId(); constant
38 emitInit(asyncId, 'event2', triggerId, {});
39 emitDestroy(asyncId);
42 emitBefore(asyncId, triggerId);
Dtest-destroy-not-blocked.js32 assert.strictEqual(activeId, res.asyncId());
36 assert.strictEqual(activeId, res.asyncId()))
43 assert.strictEqual(activeId, res.asyncId());
47 assert.strictEqual(activeId, res.asyncId()))
54 assert.strictEqual(activeId, res.asyncId());
64 assert.strictEqual(activeId, res.asyncId());
68 assert.strictEqual(activeId, res.asyncId()))
75 assert.strictEqual(activeId, res.asyncId());
84 assert.strictEqual(activeId, res.asyncId());
Dtest-httpparser-reuse.js20 init(asyncId, type, triggerAsyncId, resource) { argument
23 incomingMessageParser.push(asyncId);
26 clientRequestParser.push(asyncId);
32 `resource reused: ${asyncId}, ${triggerAsyncId}, ${type}`
37 destroy(asyncId) { argument
38 if (destroyed.includes(asyncId)) {
39 dupDestroys.push(asyncId);
41 destroyed.push(asyncId);
Dtest-improper-order.js26 const asyncId = newAsyncId(); constant
28 emitInit(asyncId, 'event1', triggerId, {});
29 emitBefore(asyncId, triggerId);
30 emitAfter(asyncId);
36 const asyncId = newAsyncId(); constant
38 emitInit(asyncId, 'event2', triggerId, {});
41 emitAfter(asyncId);
Dtest-async-exec-resource-http.js14 init(asyncId, type, triggerAsyncId, resource) { argument
15 hooked[asyncId] = resource;
Dtest-async-exec-resource-http-32060.js13 init(asyncId, type, triggerAsyncId, resource) { argument
14 hooked[asyncId] = resource;
/third_party/node/test/parallel/
Dtest-async-hooks-correctly-switch-promise-hook.js14 init(asyncId, type) { argument
15 layers.set(asyncId, {
23 before(asyncId) { argument
24 if (layers.has(asyncId)) {
25 layers.get(asyncId).before = true;
28 after(asyncId) { argument
29 if (layers.has(asyncId)) {
30 layers.get(asyncId).after = true;
33 promiseResolve(asyncId) { argument
34 if (layers.has(asyncId)) {
[all …]
Dtest-async-hooks-http-parser-destroy.js20 init: (asyncId, type) => { argument
22 createdIdsIncomingMessage.push(asyncId);
25 createdIdsClientRequest.push(asyncId);
28 destroy: (asyncId) => { argument
29 if (createdIdsIncomingMessage.includes(asyncId)) {
30 destroyedIdsIncomingMessage.push(asyncId);
32 if (createdIdsClientRequest.includes(asyncId)) {
33 destroyedIdsClientRequest.push(asyncId);
Dtest-async-hooks-destroy-on-gc.js13 destroy: common.mustCallAtLeast((asyncId) => {
14 destroyedIds.add(asyncId);
18 let asyncId = null; variable
21 asyncId = res.asyncId();
26 setImmediate(() => assert.ok(destroyedIds.has(asyncId)));
Dtest-asyncresource-bind.js12 const asyncId = executionAsyncId(); constant
13 assert.notStrictEqual(asyncId, fn());
32 const asyncId = executionAsyncId(); constant
33 assert.strictEqual(asyncResource.asyncId(), fn2());
34 assert.notStrictEqual(asyncId, fn2());
Dtest-async-hooks-http-agent.js59 const asyncId = res.socket[async_id_symbol]; constant
60 assert.ok(asyncId > 0, `${asyncId} > 0`);
Dtest-async-hooks-async-await.js11 init: (asyncId, type, triggerAsyncId) => { argument
12 asyncIds.push([triggerAsyncId, asyncId]);
Dtest-async-hooks-recursive-stack-runInAsyncScope.js11 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
15 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
/third_party/node/benchmark/async_hooks/
Dasync-resource-vs-destroy.js53 function init(asyncId, type, triggerAsyncId, resource) { argument
78 const asyncId = executionAsyncId();
79 return transactions.has(asyncId) ? transactions.get(asyncId) : null;
83 const asyncId = executionAsyncId();
84 transactions.set(asyncId, value);
87 function init(asyncId, type, triggerAsyncId, resource) { argument
88 transactions.set(asyncId, getCLS());
91 function destroy(asyncId) { argument
92 transactions.delete(asyncId);
/third_party/node/lib/internal/process/
Dtask_queues.js71 const asyncId = tock[async_id_symbol];
72 emitBefore(asyncId, tock[trigger_async_id_symbol], tock);
90 emitDestroy(asyncId);
93 emitAfter(asyncId);
124 const asyncId = newAsyncId();
127 [async_id_symbol]: asyncId,
133 emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject);
/third_party/node/lib/
Dasync_hooks.js171 const asyncId = newAsyncId();
172 this[async_id_symbol] = asyncId;
180 emitInit(asyncId, type, triggerAsyncId, this);
187 registerDestroyHook(this, asyncId, destroyed);
192 const asyncId = this[async_id_symbol];
193 emitBefore(asyncId, this[trigger_async_id_symbol], this);
202 emitAfter(asyncId);
214 asyncId() { method in AsyncResource
251 init(asyncId, type, triggerAsyncId, resource) { argument
Ddomain.js73 init(asyncId, type, triggerAsyncId, resource) { argument
76 pairing.set(asyncId, process.domain[kWeak]);
89 before(asyncId) { argument
90 const current = pairing.get(asyncId);
100 after(asyncId) { argument
101 const current = pairing.get(asyncId);
108 destroy(asyncId) { argument
109 pairing.delete(asyncId); // cleaning up
/third_party/node/doc/api/
Dasync_hooks.md60 // resource referenced by "asyncId" may not have been populated.
61 function init(asyncId, type, triggerAsyncId, resource) { }
66 function before(asyncId) { }
69 function after(asyncId) { }
72 function destroy(asyncId) { }
77 function promiseResolve(asyncId) { }
109 init(asyncId, type, triggerAsyncId, resource) { },
110 destroy(asyncId) { }
118 init(asyncId, type, triggerAsyncId, resource) { }
119 destroy(asyncId) {}
[all …]

12