Skip to content

Commit

Permalink
feat: improve tui dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Aug 1, 2023
1 parent 34196ba commit e12f3e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ export class Tui extends EventEmitter<

Deno.addSignalListener("SIGINT", destroyDispatcher);

this.on("destroy", () => {
this.on("destroy", async () => {
this.destroy();
queueMicrotask(() => Deno.exit(0));
await Promise.resolve();
Deno.exit(0);
});
}
}

0 comments on commit e12f3e4

Please sign in to comment.