deno
a8882dcb - fix(core): pump event loop during module loading to prevent hook deadlock

Commit
72 days ago
fix(core): pump event loop during module loading to prevent hook deadlock When module.register() activates load hooks, subsequent module loading via load_main_es_module/load_side_es_module would deadlock because the Rust module loader pushes load requests to a queue that requires the JS event loop to process (via op_module_hooks_poll_load), but the event loop wasn't running during module loading. Fix by interleaving event loop ticks with module load polling in load_main_es_module and load_side_es_module. Uses raw isolate pointers (same pattern as poll_event_loop) to avoid borrow conflicts between the module load future and the event loop pump.
Author
Parents
Loading