summaryrefslogtreecommitdiff
path: root/cli/js/signals.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/signals.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/signals.ts')
-rw-r--r--cli/js/signals.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/js/signals.ts b/cli/js/signals.ts
index 9f47313d4..b79868888 100644
--- a/cli/js/signals.ts
+++ b/cli/js/signals.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Signal } from "./process.ts";
-import * as dispatch from "./dispatch.ts";
import { sendSync, sendAsync } from "./dispatch_json.ts";
import { build } from "./build.ts";
@@ -106,13 +105,13 @@ export class SignalStream
/** The flag, which is true when the stream is disposed. */
private disposed = false;
constructor(signo: number) {
- this.rid = sendSync(dispatch.OP_SIGNAL_BIND, { signo }).rid;
+ this.rid = sendSync("op_signal_bind", { signo }).rid;
this.loop();
}
private async pollSignal(): Promise<boolean> {
return (
- await sendAsync(dispatch.OP_SIGNAL_POLL, {
+ await sendAsync("op_signal_poll", {
rid: this.rid
})
).done;
@@ -144,6 +143,6 @@ export class SignalStream
throw new Error("The stream has already been disposed.");
}
this.disposed = true;
- sendSync(dispatch.OP_SIGNAL_UNBIND, { rid: this.rid });
+ sendSync("op_signal_unbind", { rid: this.rid });
}
}