diff options
author | Luca Casonato <hello@lcas.dev> | 2022-10-10 10:28:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 10:28:35 +0200 |
commit | 1ab3691b091e34ffa5a0b8f2cd18a87da8c4930c (patch) | |
tree | 919c07adfc4f1f9818ec6827adedf17d7a71e2f5 /runtime | |
parent | 4d6aed1b528efc9bdac7cce7922259f5c703ec55 (diff) |
feat(core): add Deno.core.writeAll(rid, chunk) (#16228)
This commit adds a new op_write_all to core that allows writing an
entire chunk in a single async op call. Internally this calls
`Resource::write_all`.
The `writableStreamForRid` has been moved to `06_streams.js` now, and
uses this new op. Various other code paths now also use this new op.
Closes #16227
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/js/40_files.js | 4 | ||||
-rw-r--r-- | runtime/js/40_spawn.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime/js/40_files.js b/runtime/js/40_files.js index c864d3970..226abb33e 100644 --- a/runtime/js/40_files.js +++ b/runtime/js/40_files.js @@ -7,8 +7,8 @@ const { read, readSync, write, writeSync } = window.__bootstrap.io; const { ftruncate, ftruncateSync, fstat, fstatSync } = window.__bootstrap.fs; const { pathFromURL } = window.__bootstrap.util; - const { writableStreamForRid } = window.__bootstrap.streamUtils; - const { readableStreamForRid } = window.__bootstrap.streams; + const { readableStreamForRid, writableStreamForRid } = + window.__bootstrap.streams; const { ArrayPrototypeFilter, Error, diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js index 99661bf1a..a0283f0ff 100644 --- a/runtime/js/40_spawn.js +++ b/runtime/js/40_spawn.js @@ -20,8 +20,8 @@ readableStreamForRidUnrefable, readableStreamForRidUnrefableRef, readableStreamForRidUnrefableUnref, + writableStreamForRid, } = window.__bootstrap.streams; - const { writableStreamForRid } = window.__bootstrap.streamUtils; const promiseIdSymbol = SymbolFor("Deno.core.internalPromiseId"); |