diff options
author | andy finch <andyfinch7@gmail.com> | 2019-06-13 23:43:54 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-13 20:43:54 -0700 |
commit | dc60fe9f300043f191286ef804a365e16e455f87 (patch) | |
tree | c6b74e9faa6f26745b8770a18d0ae46ee34f3774 /cli/state.rs | |
parent | fdd2eb538327ee3f50fe2869320411191830c985 (diff) |
Refactor dispatch handling (#2452)
Promise id is now created in core and passed back to JS.
Diffstat (limited to 'cli/state.rs')
-rw-r--r-- | cli/state.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/state.rs b/cli/state.rs index f5eb8ae7a..aa4690d44 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -15,9 +15,9 @@ use crate::resources; use crate::resources::ResourceId; use crate::worker::Worker; use deno::Buf; +use deno::CoreOp; use deno::Loader; use deno::ModuleSpecifier; -use deno::Op; use deno::PinnedBuf; use futures::future::Either; use futures::future::Shared; @@ -106,7 +106,11 @@ impl Deref for ThreadSafeState { } impl ThreadSafeState { - pub fn dispatch(&self, control: &[u8], zero_copy: Option<PinnedBuf>) -> Op { + pub fn dispatch( + &self, + control: &[u8], + zero_copy: Option<PinnedBuf>, + ) -> CoreOp { ops::dispatch_all(self, control, zero_copy, self.dispatch_selector) } } |