mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
135053486c
This commit changes implementation of top-level-await in "deno_core". Previously promise returned from module evaluation was not awaited, leading to out-of-order execution of modules that have TLA. It's been fixed by changing "JsRuntime::mod_evaluate" to be an async function that resolves when the promise returned from module evaluation also resolves. When waiting for promise resolution event loop is polled repeatedly, until there are no more dynamic imports or pending ops.
7 lines
237 B
Text
7 lines
237 B
Text
timeout loop 0
|
|
timeout loop 1
|
|
timeout loop 2
|
|
timeout loop 3
|
|
timeout loop 4
|
|
timeout loop 5
|
|
error: Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promise.
|