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 0488782

Browse filesBrowse files
davisjamMylesBorins
authored andcommitted
doc: non-partitioned async crypto operations
Neither crypto.randomBytes nor crypto.randomFill partitions the work submitted to the threadpool. This change was suggested during the discussion of #17054. See also #17154. PR-URL: #17250 Refs: #17154 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 0443909 commit 0488782
Copy full SHA for 0488782

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/crypto.md‎

Copy file name to clipboardExpand all lines: doc/api/crypto.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
18261826
negative performance implications for some applications, see the
18271827
[`UV_THREADPOOL_SIZE`][] documentation for more information.
18281828

1829+
*Note*: The asynchronous version of `crypto.randomBytes()` is carried out
1830+
in a single threadpool request. To minimize threadpool task length variation,
1831+
partition large `randomBytes` requests when doing so as part of fulfilling a
1832+
client request.
1833+
18291834
### crypto.randomFillSync(buffer[, offset][, size])
18301835
<!-- YAML
18311836
added: v7.10.0
@@ -1933,6 +1938,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
19331938
negative performance implications for some applications, see the
19341939
[`UV_THREADPOOL_SIZE`][] documentation for more information.
19351940

1941+
*Note*: The asynchronous version of `crypto.randomFill()` is carried out
1942+
in a single threadpool request. To minimize threadpool task length variation,
1943+
partition large `randomFill` requests when doing so as part of fulfilling a
1944+
client request.
1945+
19361946
### crypto.setEngine(engine[, flags])
19371947
<!-- YAML
19381948
added: v0.11.11

0 commit comments

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