diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-23 17:50:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 11:50:45 -0400 |
commit | dd156e886b0d0f7d67538539bf7f3624b817d80a (patch) | |
tree | 01022d4993b8590fc7ab78ca9a2e6efe35974fd3 /core/examples/hello_world.rs | |
parent | 8074d8bcf3cdcc7e9a08df147e0082798a7c2760 (diff) |
refactor(core): rename send() to opcall() (#10307)
I think it's a better fit since recv() was killed and opcall <> syscall (send/recv
was too reminiscent of request/response and custom payloads)
Diffstat (limited to 'core/examples/hello_world.rs')
-rw-r--r-- | core/examples/hello_world.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/examples/hello_world.rs b/core/examples/hello_world.rs index 3a40ee29a..62d268340 100644 --- a/core/examples/hello_world.rs +++ b/core/examples/hello_world.rs @@ -19,8 +19,8 @@ fn main() { // The second one just transforms some input and returns it to JavaScript. // Register the op for outputting a string to stdout. - // It can be invoked with Deno.core.dispatch and the id this method returns - // or Deno.core.dispatchByName and the name provided. + // It can be invoked with Deno.core.opcall and the id this method returns + // or Deno.core.opSync and the name provided. runtime.register_op( "op_print", // The op_fn callback takes a state object OpState, @@ -72,7 +72,7 @@ Deno.core.ops(); // our op_print op to display the stringified argument. const _newline = new Uint8Array([10]); function print(value) { - Deno.core.dispatchByName('op_print', 0, value.toString(), _newline); + Deno.core.opSync('op_print', value.toString(), _newline); } "#, ) |