Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed9296d

Browse filesBrowse files
davisjamgibfahn
authored andcommitted
doc: fs.readFile is async but not partitioned
This change was suggested during the discussion of #17054. PR-URL: #17154 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
1 parent bf81c06 commit ed9296d
Copy full SHA for ed9296d

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,11 @@ Any specified file descriptor has to support reading.
18971897
*Note*: If a file descriptor is specified as the `path`, it will not be closed
18981898
automatically.
18991899

1900+
*Note*: `fs.readFile()` reads the entire file in a single threadpool request.
1901+
To minimize threadpool task length variation, prefer the partitioned APIs
1902+
`fs.read()` and `fs.createReadStream()` when reading files as part of
1903+
fulfilling a client request.
1904+
19001905
## fs.readFileSync(path[, options])
19011906
<!-- YAML
19021907
added: v0.1.8

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.