diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-11-09 19:26:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 19:26:17 +0100 |
commit | 375ce63c6390cf7710210ce22f14a2b5a02cbfc3 (patch) | |
tree | 85100876e5e0b50514385ae3c7ce08493c82b38b /cli/tests/unit/opcall_test.ts | |
parent | 1eae6c139ee1dac28df57d67d993792b773fa1ff (diff) |
feat(core): streams (#12596)
This allows resources to be "streams" by implementing read/write/shutdown. These streams are implicit since their nature (read/write/duplex) isn't known until called, but we could easily add another method to explicitly tag resources as streams.
`op_read/op_write/op_shutdown` are now builtin ops provided by `deno_core`
Note: this current implementation is simple & straightforward but it results in an additional alloc per read/write call
Closes #12556
Diffstat (limited to 'cli/tests/unit/opcall_test.ts')
-rw-r--r-- | cli/tests/unit/opcall_test.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts index 63871cd4c..2cf086220 100644 --- a/cli/tests/unit/opcall_test.ts +++ b/cli/tests/unit/opcall_test.ts @@ -35,8 +35,7 @@ declare global { unitTest(async function opsAsyncBadResource() { try { const nonExistingRid = 9999; - await Deno.core.opAsync( - "op_read_async", + await Deno.core.read( nonExistingRid, new Uint8Array(0), ); |