Skip to content

Commit

Permalink
doc: non-partitioned async crypto operations
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
davisjam authored and MylesBorins committed Dec 12, 2017
1 parent 0443909 commit 0488782
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
negative performance implications for some applications, see the
[`UV_THREADPOOL_SIZE`][] documentation for more information.

*Note*: The asynchronous version of `crypto.randomBytes()` is carried out
in a single threadpool request. To minimize threadpool task length variation,
partition large `randomBytes` requests when doing so as part of fulfilling a
client request.

### crypto.randomFillSync(buffer[, offset][, size])
<!-- YAML
added: v7.10.0
Expand Down Expand Up @@ -1933,6 +1938,11 @@ Note that this API uses libuv's threadpool, which can have surprising and
negative performance implications for some applications, see the
[`UV_THREADPOOL_SIZE`][] documentation for more information.

*Note*: The asynchronous version of `crypto.randomFill()` is carried out
in a single threadpool request. To minimize threadpool task length variation,
partition large `randomFill` requests when doing so as part of fulfilling a
client request.

### crypto.setEngine(engine[, flags])
<!-- YAML
added: v0.11.11
Expand Down

0 comments on commit 0488782

Please sign in to comment.