mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 06:31:15 +00:00
Refactor dispatch handling (#2452)
Promise id is now created in core and passed back to JS.
This commit is contained in:
parent
fdd2eb5383
commit
dc60fe9f30
18 changed files with 667 additions and 709 deletions
6
core/core.d.ts
vendored
6
core/core.d.ts
vendored
|
@ -4,15 +4,13 @@
|
|||
// Deno core. These are not intended to be used directly by runtime users of
|
||||
// Deno and therefore do not flow through to the runtime type library.
|
||||
|
||||
declare interface MessageCallback {
|
||||
(msg: Uint8Array): void;
|
||||
}
|
||||
declare type MessageCallback = (promiseId: number, msg: Uint8Array) => void;
|
||||
|
||||
declare interface DenoCore {
|
||||
dispatch(
|
||||
control: Uint8Array,
|
||||
zeroCopy?: ArrayBufferView | null
|
||||
): Uint8Array | null;
|
||||
): Uint8Array | null | number;
|
||||
setAsyncHandler(cb: MessageCallback): void;
|
||||
sharedQueue: {
|
||||
head(): number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue