mirror of
https://github.com/denoland/deno.git
synced 2025-08-01 09:32:28 +00:00
Refactor Worker and ThreadSafeState (#3242)
* Split ThreadSafeState into State and GlobalState. State is a "local" state belonging to "Worker" while "GlobalState" is state shared by whole program. * Update "Worker" and ops to use "GlobalState" where applicable * Move and refactor "WorkerChannels" resource
This commit is contained in:
parent
429439d198
commit
0049d4e50c
16 changed files with 557 additions and 414 deletions
|
@ -2,7 +2,6 @@
|
|||
use crate::compilers::CompiledModule;
|
||||
use crate::compilers::CompiledModuleFuture;
|
||||
use crate::file_fetcher::SourceFile;
|
||||
use crate::state::ThreadSafeState;
|
||||
use deno::ErrBox;
|
||||
use regex::Regex;
|
||||
use std::str;
|
||||
|
@ -15,7 +14,6 @@ pub struct JsonCompiler {}
|
|||
impl JsonCompiler {
|
||||
pub fn compile_async(
|
||||
self: &Self,
|
||||
_state: ThreadSafeState,
|
||||
source_file: &SourceFile,
|
||||
) -> Box<CompiledModuleFuture> {
|
||||
let maybe_json_value: serde_json::Result<serde_json::Value> =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue