Files
node/lib/internal
Anna Henningsen 8a5c7f6abd fs: synchronize close with other I/O for streams
Part of the flakiness in the
parallel/test-readline-async-iterators-destroy test comes from
fs streams starting `_read()` and `_destroy()` without waiting
for the other to finish, which can lead to the `fs.read()` call
resulting in `EBADF` if timing is bad.

Fix this by synchronizing write and read operations with `close()`.

Refs: https://github.com/nodejs/node/issues/30660

PR-URL: https://github.com/nodejs/node/pull/30837
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-10 10:04:00 -05:00
..
2019-11-25 10:28:15 +01:00
2019-12-10 09:34:06 +08:00
2018-05-18 15:25:41 +02:00
2019-11-26 18:43:41 +05:30
2019-11-30 13:58:25 +01:00
2019-11-25 19:52:57 +05:30

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.