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 a2c82c3

Browse filesBrowse files
davisjamgibfahn
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 af7d7a4 commit a2c82c3
Copy full SHA for a2c82c3

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
@@ -1748,6 +1748,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
17481748
negative performance implications for some applications, see the
17491749
[`UV_THREADPOOL_SIZE`][] documentation for more information.
17501750

1751+
*Note*: The asynchronous version of `crypto.randomBytes()` is carried out
1752+
in a single threadpool request. To minimize threadpool task length variation,
1753+
partition large `randomBytes` requests when doing so as part of fulfilling a
1754+
client request.
1755+
17511756
### crypto.randomFillSync(buffer[, offset][, size])
17521757
<!-- YAML
17531758
added: v7.10.0
@@ -1812,6 +1817,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
18121817
negative performance implications for some applications, see the
18131818
[`UV_THREADPOOL_SIZE`][] documentation for more information.
18141819

1820+
*Note*: The asynchronous version of `crypto.randomFill()` is carried out
1821+
in a single threadpool request. To minimize threadpool task length variation,
1822+
partition large `randomFill` requests when doing so as part of fulfilling a
1823+
client request.
1824+
18151825
### crypto.setEngine(engine[, flags])
18161826
<!-- YAML
18171827
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.