mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat: support individual async handler for each op (#3690)
This commit is contained in:
parent
d8ad81d3fb
commit
fe5662058e
9 changed files with 37 additions and 84 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue