Skip to content

doc: fix up warning text about character devices

The text contained a number of inaccuracies:

  • The main thread is never blocked by a stream close.
  • There is no such thing as an EOF character on the OS level, the libuv level, or the Node.js stream level.
  • These streams do respond to .close(), but pending reads can delay this indefinitely.
  • Pushing a random character into the stream works only when the source data can be controlled; Using the JS .push() method is something different, and does not “unblock” any threads.

Refs: https://github.com/nodejs/node/pull/21212

Pinging previous reviewers: @gireeshpunathil @vsemozhetbyt @jasnell @trivikr

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading