diff options
author | Andy Finch <andyfinch7@gmail.com> | 2020-01-17 08:26:11 -0500 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2020-01-17 08:26:11 -0500 |
commit | fe5662058e0c7767e7b2724451f9d5a3f133ffbf (patch) | |
tree | be43744898f64af6605246ba95ede55a869f7ab4 /cli/js/os.ts | |
parent | d8ad81d3fb5b4b9502ea021edfc99201538553e6 (diff) |
feat: support individual async handler for each op (#3690)
Diffstat (limited to 'cli/js/os.ts')
-rw-r--r-- | cli/js/os.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/js/os.ts b/cli/js/os.ts index e0dd0752b..9b4301aea 100644 --- a/cli/js/os.ts +++ b/cli/js/os.ts @@ -89,7 +89,6 @@ interface Start { // the runtime and the compiler environments. // @internal export function start(preserveDenoNamespace = true, source?: string): Start { - core.setAsyncHandler(dispatch.asyncMsgFromRust); const ops = core.ops(); // TODO(bartlomieju): this is a prototype, we should come up with // something a bit more sophisticated @@ -98,6 +97,7 @@ export function start(preserveDenoNamespace = true, source?: string): Start { // Assign op ids to actual variables // TODO(ry) This type casting is gross and should be fixed. ((dispatch as unknown) as { [key: string]: number })[opName] = opId; + core.setAsyncHandler(opId, dispatch.getAsyncHandler(opName)); } // First we send an empty `Start` message to let the privileged side know we // are ready. The response should be a `StartRes` message containing the CLI |