Closed nathanwhit closed 1 month ago
Attention: Patch coverage is 80.95238%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 81.44%. Comparing base (
0c7f83e
) to head (9ca4c73
). Report is 22 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
core/modules/map.rs | 76.47% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixes a hang that could occur when a module contained a dynamic import that doesn't resolve immediately, and there was a pending op outstanding.
The original reproduction (ref https://github.com/denoland/deno/issues/24098) effectively boiled down to this:
Upon getting a request, it would hang when trying to import
"repro.ts"
. What was happening here was thatDeno.serve
created an op (op_http_serve
) that stayed pending indefinitely, so we assumed that we would poll again, but that didn't actually hold. Unlike non-dynamic module evaluation, we weren't waking the event loop for polling when the dynamic import evaluation promise resolved.The fix here is to attaching callbacks to the dynamic import promise to wake the event loop when it resolves, similar to what we do for normal module evaluation.