node:fs createWriteStream - IO blocks event loop #14542
Labels
bug
Something isn't working
confirmed bug
We can reproduce this issue
linux
An issue that occurs on Linux
macOS
An issue that occurs on macOS
node:fs
What version of Bun is running?
1.1.30
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
When piping to a file (fs.createWriteStream) the IO blocks event loop. For example, the timers become unresponsive.
Following code uses two streams. Readable - generates some chunks, fs WriteStream is supposed to write them to a file.
For example I use a
setInterval
which prints some stats every second and asetTimeout
for some delayed task.What is the expected behavior?
Expected the timers to work while performing IO. Deno/Node output:
What do you see instead?
Bun starts the timers after the write stream is closed. Which is practically
fs.writeFileSync
:Additional information
No response
The text was updated successfully, but these errors were encountered: