mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +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
|
@ -52,7 +52,7 @@ impl fmt::Display for PermissionAccessorState {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct PermissionAccessor {
|
||||
state: Arc<AtomicUsize>,
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ impl Default for PermissionAccessor {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DenoPermissions {
|
||||
// Keep in sync with cli/js/permissions.ts
|
||||
pub allow_read: PermissionAccessor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue