feat: support individual async handler for each op (#3690)

This commit is contained in:
Andy Finch 2020-01-17 08:26:11 -05:00 committed by Ry Dahl
parent d8ad81d3fb
commit fe5662058e
9 changed files with 37 additions and 84 deletions

View file

@ -1,5 +1,5 @@
import { sendSync } from "./dispatch_json.ts";
import { OP_OPEN_PLUGIN, setPluginAsyncHandler } from "./dispatch.ts";
import { OP_OPEN_PLUGIN } from "./dispatch.ts";
import { core } from "./core.ts";
export interface AsyncHandler {
@ -25,7 +25,7 @@ class PluginOpImpl implements PluginOp {
}
setAsyncHandler(handler: AsyncHandler): void {
setPluginAsyncHandler(this.opId, handler);
core.setAsyncHandler(this.opId, handler);
}
}