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: https://github.com/nodejs/node/pull/17250 Refs: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Родитель
645cd19b58
Коммит
16e87eddd6
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче