Home
last modified time | relevance | path

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

/third_party/node/lib/internal/
H A Dinspector_async_hook.js16 init(asyncId, type, triggerAsyncId, resource) {
23 this.promiseIds.add(asyncId);
25 inspector.asyncTaskScheduled(type, asyncId, recurring);
28 before(asyncId) {
29 if (this.promiseIds.has(asyncId))
31 inspector.asyncTaskStarted(asyncId);
34 after(asyncId) {
35 if (this.promiseIds.has(asyncId))
37 inspector.asyncTaskFinished(asyncId);
40 destroy(asyncId) {
[all...]
H A Dasync_hooks.js116 function callbackTrampoline(asyncId, resource, cb, ...args) {
120 if (asyncId !== 0 && hasHooks(kBefore))
121 emitBeforeNative(asyncId);
124 if (asyncId === 0 && typeof domain_cb === 'function') {
131 if (asyncId !== 0 && hasHooks(kAfter))
132 emitAfterNative(asyncId);
190 function emitInitNative(asyncId, type, triggerAsyncId, resource) {
201 asyncId, type, triggerAsyncId,
221 // Called from native. The asyncId stack handling is taken care of there
223 function emitHook(symbol, asyncId) {
[all...]
H A Dtrace_events_async_hooks.js41 // non-init events, use a map to manually map the asyncId to the type name.
44 init(asyncId, type, triggerAsyncId, resource) {
47 typeMemory.set(asyncId, type);
49 type, asyncId,
56 before(asyncId) {
57 const type = typeMemory.get(asyncId);
60 trace(kBeforeEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId);
63 after(asyncId) {
64 const type = typeMemory.get(asyncId);
67 trace(kEndEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId);
[all...]
H A Dtimers.js107 const async_id_symbol = Symbol('asyncId');
160 const asyncId = resource[async_id_symbol] = newAsyncId();
164 emitInit(asyncId, type, triggerAsyncId, resource);
470 const asyncId = immediate[async_id_symbol];
471 emitBefore(asyncId, immediate[trigger_async_id_symbol], immediate);
483 emitDestroy(asyncId);
488 emitAfter(asyncId);
545 const asyncId = timer[async_id_symbol];
555 emitDestroy(asyncId);
560 emitBefore(asyncId, time
[all...]
/third_party/node/test/async-hooks/
H A Dtest-async-await.js17 // Either 'before' or 'after' AND asyncId must be present in the other map
29 function oninit(asyncId, type) {
31 promisesInitState.set(asyncId, 'inited');
35 function onbefore(asyncId) {
36 if (!promisesInitState.has(asyncId)) {
39 promisesExecutionState.set(asyncId, 'before');
42 function onafter(asyncId) {
43 if (!promisesInitState.has(asyncId)) {
47 assert.strictEqual(promisesExecutionState.get(asyncId), 'before',
50 assert.strictEqual(promisesInitState.get(asyncId), 'resolve
[all...]
H A Dtest-httpparser-reuse.js20 init(asyncId, type, triggerAsyncId, resource) {
23 incomingMessageParser.push(asyncId);
26 clientRequestParser.push(asyncId);
32 `resource reused: ${asyncId}, ${triggerAsyncId}, ${type}`,
37 destroy(asyncId) {
38 if (destroyed.includes(asyncId)) {
39 dupDestroys.push(asyncId);
41 destroyed.push(asyncId);
H A 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());
H A Dtest-embedder.api.async-resource.js46 assert.strictEqual(typeof alcaEvent.asyncId(), 'number');
47 assert.notStrictEqual(alcaEvent.asyncId(), alcaTriggerId);
/third_party/node/test/parallel/
H A Dtest-eventemitter-asyncresource.js23 function log(asyncId, name) {
24 const entry = eventMap.get(asyncId);
29 init(asyncId, type, triggerAsyncId, resource) {
31 eventMap.set(asyncId, [
42 before(asyncId) { log(asyncId, 'before'); },
43 after(asyncId) { log(asyncId, 'after'); },
44 destroy(asyncId) { log(asyncId, 'destro
[all...]
H A Dtest-async-hooks-http-parser-destroy.js20 init: (asyncId, type) => {
22 createdIdsIncomingMessage.push(asyncId);
25 createdIdsClientRequest.push(asyncId);
28 destroy: (asyncId) => {
29 if (createdIdsIncomingMessage.includes(asyncId)) {
30 destroyedIdsIncomingMessage.push(asyncId);
32 if (createdIdsClientRequest.includes(asyncId)) {
33 destroyedIdsClientRequest.push(asyncId);
H A Dtest-worker-messageport-hasref.js10 init(asyncId, type, triggerAsyncId, resource) {
12 m.set(asyncId, { type, resource });
15 destroy(asyncId) {
16 m.delete(asyncId);
22 for (const asyncId of m.keys()) {
23 const { type, resource } = m.get(asyncId);
H A Dtest-async-hooks-recursive-stack-runInAsyncScope.js11 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
15 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
H A Dtest-async-hooks-execution-async-resource.js14 init(asyncId, type, triggerAsyncId, resource) {
H A Dtest-async-hooks-execution-async-resource-await.js16 init(asyncId, type, triggerAsyncId, resource) {
/third_party/node/benchmark/async_hooks/
H A Dasync-resource-vs-destroy.js53 function init(asyncId, type, triggerAsyncId, resource) {
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) {
88 transactions.set(asyncId, getCLS());
91 function destroy(asyncId) {
92 transactions.delete(asyncId);
[all...]
/third_party/node/lib/internal/process/
H A Dtask_queues.js71 const asyncId = tock[async_id_symbol];
72 emitBefore(asyncId, tock[trigger_async_id_symbol], tock);
90 emitDestroy(asyncId);
93 emitAfter(asyncId);
123 const asyncId = newAsyncId();
126 [async_id_symbol]: asyncId,
132 emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject);
H A Dexecution.js191 const asyncId = executionAsyncId();
192 if (asyncId === 0)
195 emitAfter(asyncId);
/third_party/node/lib/
H A Dasync_hooks.js177 const asyncId = newAsyncId();
178 this[async_id_symbol] = asyncId;
186 emitInit(asyncId, type, triggerAsyncId, this);
193 registerDestroyHook(this, asyncId, destroyed);
198 const asyncId = this[async_id_symbol];
199 emitBefore(asyncId, this[trigger_async_id_symbol], this);
208 emitAfter(asyncId);
220 asyncId() {
267 init(asyncId, type, triggerAsyncId, resource) {
H A Ddomain.js76 init(asyncId, type, triggerAsyncId, resource) {
79 pairing.set(asyncId, process.domain[kWeak]);
98 before(asyncId) {
99 const current = pairing.get(asyncId);
109 after(asyncId) {
110 const current = pairing.get(asyncId);
117 destroy(asyncId) {
118 pairing.delete(asyncId); // cleaning up
H A D_http_client.js733 const asyncId = socket._handle ? socket._handle.getAsyncId() : undefined;
736 defaultTriggerAsyncIdScope(asyncId, process.nextTick, emitFreeNT, req);
H A Devents.js181 get asyncId() {
184 return this.asyncResource.asyncId();
/third_party/node/lib/internal/test_runner/
H A Dharness.js29 testResources.set(reporterScope.asyncId(), reporterScope);
127 init(asyncId, type, triggerAsyncId, resource) {
129 testResources.set(asyncId, resource);
136 testResources.set(asyncId, parent);
139 destroy(asyncId) {
140 testResources.delete(asyncId);
/third_party/node/deps/npm/test/fixtures/
H A Dsandbox.js16 init: (asyncId, type, triggerAsyncId, resource) => {
18 chain.set(asyncId, triggerAsyncId)
20 before: (asyncId) => {
22 let parent = asyncId
/third_party/node/src/
H A Dinspector_js_api.cc226 static void* GetAsyncTask(int64_t asyncId) { in GetAsyncTask() argument
231 // On 32bit platforms, the 64bit asyncId would get truncated when converted in GetAsyncTask()
235 return reinterpret_cast<void*>(asyncId << 1); in GetAsyncTask()
H A Dasync_wrap.cc197 double asyncId; member in node::DestroyParam
224 AsyncWrap::EmitDestroy(p->env, p->asyncId); in WeakCallback()
237 p->asyncId = args[1].As<Number>()->Value(); in RegisterDestroyHook()

Completed in 9 milliseconds