Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify op dispatcher to include &mut Isolate argument #4821

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

ry
Copy link
Member

@ry ry commented Apr 19, 2020

Towards #3453, #4222

  • Removes unnecessary RwLock and Rc around the op registry table
  • Preparation to move resource_table to deno_core::Isolate.

@ry ry requested a review from bartlomieju April 19, 2020 18:48
@ry ry mentioned this pull request Apr 19, 2020
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards denoland#3453, denoland#4222
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


#[derive(Default)]
pub struct OpRegistry {
dispatchers: RwLock<Vec<Rc<OpDispatcher>>>,
name_to_id: RwLock<HashMap<String, OpId>>,
dispatchers: Vec<Rc<OpDispatcher>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

let mut registry = Self::default();
let op_id = registry.register("ops", |isolate, _, _| {
let buf = isolate.op_registry.json_map();
Op::Sync(buf)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@ry ry merged commit c1ec042 into denoland:master Apr 20, 2020
@ry ry deleted the isolate_dispatch branch April 20, 2020 03:55
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards denoland#3453, denoland#4222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants