summaryrefslogtreecommitdiff
path: root/test_ffi/tests/event_loop_integration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test_ffi/tests/event_loop_integration.ts')
-rw-r--r--test_ffi/tests/event_loop_integration.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_ffi/tests/event_loop_integration.ts b/test_ffi/tests/event_loop_integration.ts
index 28152dabf..55dc563bb 100644
--- a/test_ffi/tests/event_loop_integration.ts
+++ b/test_ffi/tests/event_loop_integration.ts
@@ -29,7 +29,7 @@ const dylib = Deno.dlopen(
let retry = false;
const tripleLogCallback = () => {
console.log("Sync");
- Promise.resolve().then(() => {
+ queueMicrotask(() => {
console.log("Async");
callback.unref();
});
@@ -66,7 +66,7 @@ console.log("STORED_FUNCTION called");
// Wait to make sure synch logging and async logging
await new Promise((res) => setTimeout(res, 100));
-// Ref once to make sure both `Promise.resolve().then()` and `setTimeout()`
+// Ref once to make sure both `queueMicrotask()` and `setTimeout()`
// must resolve and unref before isolate exists.
// One ref'ing has been done by `threadSafe` constructor.
callback.ref();