GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: fix Utf8Stream flush handling · nodejs/node@112af9e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • fs.md
  • lib/internal/streams
    • fast-utf8-stream.js
  • test/parallel
    • test-fastutf8stream-flush-mocks.js
    • test-fastutf8stream-flush-sync.js
    • test-fastutf8stream-flush.js
    • test-fastutf8stream-periodicflush.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+9-2Lines changed: 9 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -8508,13 +8508,20 @@ Close the stream gracefully, flushing the internal buffer before closing.
85088508
* `callback` {Function}
85098509
* `err` {Error|null} An error if the flush failed, otherwise `null`.
85108510
8511-
Writes the current buffer to the file if a write was not in progress. Do
8512-
nothing if `minLength` is zero or if it is already writing.
8511+
Writes the current buffer to the file. The callback is invoked after pending
8512+
writes complete and, unless the `fsync` option is enabled, after the data has
8513+
been synchronized with `fs.fsync()`. `fsync` errors indicating that the file
8514+
descriptor does not support synchronization (for example, a pipe or a TTY)
8515+
are ignored.
85138516
85148517
#### `utf8Stream.flushSync()`
85158518
85168519
Flushes the buffered data synchronously. This is a costly operation.
85178520
8521+
If an asynchronous write is in flight when `flushSync()` is called, only the
8522+
data queued after it is written, and it may reach the file before the data
8523+
of the in-flight write.
8524+
85188525
#### `utf8Stream.fsync`
85198526
85208527
* {boolean} Whether the stream is performing a `fs.fsyncSync()` after every

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.