-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit refactors the event loop handling code, mainly by extracting the common pieces into a reusable function. Additionally, this commit ensures that the result of `Promise.finish` is corectly handled, which fixes execution of code with top level awaits. Finally, this commit also ensures that we test the `experimental_event_loop` in CI for the CLI and core crates (follow-up to #238)
- Loading branch information
1 parent
d4a6e14
commit e902203
Showing
4 changed files
with
66 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
async function foo() { | ||
return Promise.resolve("bar"); | ||
} | ||
|
||
const output = new TextEncoder().encode(await foo()); | ||
Javy.IO.writeSync(1, output); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters