mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
fix(runtime/signal): use op_async_unref for op_signal_poll (#11097)
This commit is contained in:
parent
66c5f41c5b
commit
606611708c
5 changed files with 62 additions and 7 deletions
|
@ -129,6 +129,24 @@ unitTest(
|
|||
},
|
||||
);
|
||||
|
||||
// This tests that pending op_signal_poll doesn't block the runtime from exiting the process.
|
||||
unitTest(
|
||||
{ ignore: Deno.build.os === "windows", perms: { run: true, read: true } },
|
||||
async function signalStreamExitTest(): Promise<void> {
|
||||
const p = Deno.run({
|
||||
cmd: [
|
||||
Deno.execPath(),
|
||||
"eval",
|
||||
"--unstable",
|
||||
"(async () => { for await (const _ of Deno.signals.io()) {} })()",
|
||||
],
|
||||
});
|
||||
const res = await p.status();
|
||||
assertEquals(res.code, 0);
|
||||
p.close();
|
||||
},
|
||||
);
|
||||
|
||||
unitTest(
|
||||
{ ignore: Deno.build.os === "windows", perms: { run: true } },
|
||||
async function signalPromiseTest(): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue