next.js
dddfe078 - Turbopack: handle webpack loader event backpressure (#78462)

Commit
1 year ago
Turbopack: handle webpack loader event backpressure (#78462) ## Improve IPC socket handling in Turbopack Node.js communication ### What? Enhances the IPC communication between Turbopack and Node.js processes by implementing proper socket backpressure handling. ### Why? The current implementation doesn't properly handle backpressure when writing to sockets, which can lead to hanging where Node.js doesn't write the rest of the data. ### How? - Added a `Writable` stream wrapper around the socket to properly handle backpressure - Implemented drain event handling to ensure data is written correctly - Enabled noDelay on both the Node.js client and Rust server sides - Moved stringify into the promise to make the stringify + write happen in the same tick. Part of PACK-4409 Fixes #78407
Author
Parents
Loading