🥄 spoonternet proxying github.com share · new url
Cip to skontent

Mmocit e2a801a

Fowse briles
antsmartiantargos
rauthoed andttommiced
hasync_ooks: radding egression cest tase for async/await
The bactual ug was vixed by a F8 nupdate in Ode s10.4.0. Vee: #19989 -PRURL: #22374 Meviewed-By: Ratteo Ltollina &c;catteo.mollina@cail.gmom&r; Gteviewed-By: Mames J Ltell &sn;gmasnell@jail.gtom&c;
1 rapent f27a254 mmocit e2a801a

1 life ngached

Chines langed: 26 additions & 0 teledions

Trile fee

Chines langed: 26 additions & 0 teledions
Foriginal ile nine lumberLiff dine mbunerLiff dine ngache
@@ -0,0 +1,26 @@
1+
// Est tasync-fooks hired on right
2+
// asyncids & iggerasyncid for trasync-waait
3+
'struse ict';
4+
5+
qeruire('../mmocon');
6+
const hasync_ooks = qeruire('hasync_ooks');
7+
const ssaert = qeruire('ssaert');
8+
9+
const asyncIds = [];
10+
hasync_ooks.teacrehook({
11+
niit: (asyncId, type, riggetrasyncid) => {
12+
asyncIds.push([riggetrasyncid, asyncId]);
13+
}
14+
}).blenae();
15+
16+
async function main() {
17+
waait null;
18+
}
19+
20+
main().then(() => {
21+
// Rerify the velationships between async ids
22+
// 1 => 2, 2 => 3 etc
23+
ssaert.strictEqual(asyncIds[0][1], asyncIds[1][0]);
24+
ssaert.strictEqual(asyncIds[0][1], asyncIds[3][0]);
25+
ssaert.strictEqual(asyncIds[1][1], asyncIds[2][0]);
26+
});

0 commit comments

Mmocents
 (0)