diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-11-09 13:57:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 13:57:26 -0700 |
commit | 9010b8df53cd37f0410e08c43a194667974686a2 (patch) | |
tree | 97c13d696ba1216e74b745f5ce1b25ed34afa2cd /cli | |
parent | c4029f6af22b373bf22383453cb4e2159f3b5b72 (diff) |
perf: remove knowledge of promise IDs from deno (#21132)
We can move all promise ID knowledge to deno_core, allowing us to better
experiment with promise implementation in deno_core.
`{un,}refOpPromise(promise)` is equivalent to
`{un,}refOp(promise[promiseIdSymbol])`
Diffstat (limited to 'cli')
-rw-r--r-- | cli/tests/unit/ref_unref_test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tests/unit/ref_unref_test.ts b/cli/tests/unit/ref_unref_test.ts index eea93b165..656636d0c 100644 --- a/cli/tests/unit/ref_unref_test.ts +++ b/cli/tests/unit/ref_unref_test.ts @@ -2,11 +2,11 @@ import { assertNotEquals, execCode } from "./test_util.ts"; -Deno.test("[unrefOp] unref'ing invalid ops does not have effects", async () => { +Deno.test("[unrefOpPromise] unref'ing invalid ops does not have effects", async () => { const [statusCode, _] = await execCode(` - Deno[Deno.internal].core.unrefOp(-1); + Deno[Deno.internal].core.unrefOpPromise(new Promise(r => null)); setTimeout(() => { throw new Error() }, 10) `); - // Invalid unrefOp call doesn't affect exit condition of event loop + // Invalid unrefOpPromise call doesn't affect exit condition of event loop assertNotEquals(statusCode, 0); }); |